generator

package
v0.40.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 24, 2024 License: Apache-2.0 Imports: 45 Imported by: 0

Documentation

Index

Constants

View Source
const ServiceStatsClusterName = "service_stats"

Variables

View Source
var ErrDomainConflict = errors.New("ingress has a conflicting domain with another ingress")

ErrDomainConflict is an error produces when two ingresses have conflicting domains.

Functions

func UpdateInfoForIngress

func UpdateInfoForIngress(ctx context.Context, caches *Caches, ing *v1alpha1.Ingress, translator *IngressTranslator, extAuthzEnabled bool) error

UpdateInfoForIngress translates an Ingress into envoy configuration and updates the respective caches.

Types

type Caches

type Caches struct {
	// contains filtered or unexported fields
}

func NewCaches

func NewCaches(kubernetesClient kubeclient.Interface, extAuthz bool) (*Caches, error)

func (*Caches) DeleteIngressInfo

func (caches *Caches) DeleteIngressInfo(ctx context.Context, ingressName string, ingressNamespace string) error

DeleteIngressInfo removes an ingress from the caches.

Notice that the clusters are not deleted. That's handled with the expiration time set in the "ClustersCache" struct.

func (*Caches) SetOnEvicted

func (caches *Caches) SetOnEvicted(f func(types.NamespacedName, interface{}))

SetOnEvicted allows to set a function that will be executed when any key on the cache expires.

func (*Caches) ToEnvoySnapshot

func (caches *Caches) ToEnvoySnapshot(ctx context.Context) (*cache.Snapshot, error)

func (*Caches) UpdateIngress added in v0.15.0

func (caches *Caches) UpdateIngress(ctx context.Context, ingressTranslation *translatedIngress) error

type ClustersCache

type ClustersCache struct {
	// contains filtered or unexported fields
}

type IngressTranslator

type IngressTranslator struct {
	// contains filtered or unexported fields
}

func NewIngressTranslator

func NewIngressTranslator(
	secretGetter func(ns, name string) (*corev1.Secret, error),
	nsConfigmapGetter func(label string) ([]*corev1.ConfigMap, error),
	endpointsGetter func(ns, name string) (*corev1.Endpoints, error),
	serviceGetter func(ns, name string) (*corev1.Service, error),
	tracker tracker.Interface) IngressTranslator

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL