generator

package
v0.14.0 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2020 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

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) *Caches

func (*Caches) AddClusterForIngress

func (caches *Caches) AddClusterForIngress(cluster *v2.Cluster, ingressName string, ingressNamespace string)

func (*Caches) AddStatusVirtualHost

func (caches *Caches) AddStatusVirtualHost()

func (*Caches) AddTranslatedIngress

func (caches *Caches) AddTranslatedIngress(ingress *v1alpha1.Ingress, translatedIngress *translatedIngress)

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) SetListeners

func (caches *Caches) SetListeners(kubeclient kubeclient.Interface) error

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)

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