generator

package
v0.16.0 Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2020 License: Apache-2.0 Imports: 27 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 InsertKourierHeaders

func InsertKourierHeaders(ing *v1alpha1.Ingress) error

InsertKourierHeaders adds an AppendHeader rule so that any request going through a Gateway is tagged with the version of the Ingress currently deployed on the Gateway and also a Random header to force envoy to reload the new config part. This is a hack, this should be removed once we can move to the latest version of envoy.

func UpdateInfoForIngress

func UpdateInfoForIngress(caches *Caches, ingress *v1alpha1.Ingress, kubeclient kubeclient.Interface, translator *IngressTranslator, logger *zap.SugaredLogger, 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(logger *zap.SugaredLogger, kubernetesClient kubeclient.Interface, extAuthz bool, ingressesToSync []*v1alpha1.Ingress) (*Caches, error)

func (*Caches) DeleteIngressInfo

func (caches *Caches) DeleteIngressInfo(ingressName string, ingressNamespace string,
	kubeclient kubeclient.Interface) 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) GetIngress

func (caches *Caches) GetIngress(ingressName, ingressNamespace string) *v1alpha1.Ingress

func (*Caches) SetOnEvicted

func (caches *Caches) SetOnEvicted(f func(string, 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() (cache.Snapshot, error)

func (*Caches) UpdateIngress added in v0.15.0

func (caches *Caches) UpdateIngress(ingress *v1alpha1.Ingress, ingressTranslation *translatedIngress, kubeclient kubeclient.Interface) error

func (*Caches) WaitForSync added in v0.16.0

func (caches *Caches) WaitForSync() <-chan struct{}

type ClustersCache

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

type IngressTranslator

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

func NewIngressTranslator

func NewIngressTranslator(kubeclient kubeclient.Interface, endpointsLister corev1listers.EndpointsLister, localDomainName string, tracker tracker.Interface,
	logger *zap.SugaredLogger) IngressTranslator

Jump to

Keyboard shortcuts

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