generator

package
v0.35.3 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2023 License: Apache-2.0 Imports: 41 Imported by: 0

Documentation

Index

Constants

This section is empty.

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(ctx context.Context, 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),
	endpointsGetter func(ns, name string) (*corev1.Endpoints, error),
	serviceGetter func(ns, name string) (*corev1.Service, error),
	namespaceGetter func(name string) (*corev1.Namespace, error),
	tracker tracker.Interface) IngressTranslator

Jump to

Keyboard shortcuts

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