generator

package
v0.20.0 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2021 License: Apache-2.0 Imports: 33 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")

Functions

func UpdateInfoForIngress

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

For now, when updating the info for an ingress we delete it, and then regenerate it. We can optimize this later.

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

Note: changes the snapshot version of the caches object 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),
	tracker tracker.Interface) IngressTranslator

Jump to

Keyboard shortcuts

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