v0.0.0-...-d1db816 Latest Latest

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

Go to latest
Published: Jan 27, 2020 License: Apache-2.0 Imports: 63 Imported by: 0



Package ingress implements a kubernetes controller which tracks Ingress resource and reconcile VirtualService as its child resource.



This section is empty.


This section is empty.


func NewController

func NewController(
	ctx context.Context,
	cmw configmap.Watcher,
) *controller.Impl

NewController works as a constructor for Ingress Controller


type Reconciler

type Reconciler struct {
	// contains filtered or unexported fields

Reconciler implements the control loop for the Ingress resources.

func (*Reconciler) GetKubeClient

func (r *Reconciler) GetKubeClient() kubernetes.Interface

GetKubeClient returns the client to access k8s resources.

func (*Reconciler) GetSecretLister

func (r *Reconciler) GetSecretLister() corev1listers.SecretLister

GetSecretLister returns the lister for Secret.

func (*Reconciler) GetSharedClient

func (r *Reconciler) GetSharedClient() sharedclientset.Interface

GetSharedClient returns the client to access shared resources.

func (*Reconciler) GetVirtualServiceLister

func (r *Reconciler) GetVirtualServiceLister() istiolisters.VirtualServiceLister

GetVirtualServiceLister returns the lister for VirtualService.

func (*Reconciler) Reconcile

func (r *Reconciler) Reconcile(ctx context.Context, key string) error

Reconcile compares the actual state with the desired, and attempts to converge the two. It then updates the Status block of the Ingress resource with the current status of the resource.

type StatusManager

type StatusManager interface {
	IsReady(ia *v1alpha1.Ingress, gw map[v1alpha1.IngressVisibility]sets.String) (bool, error)

StatusManager provides a way to check if a VirtualService is ready

type StatusProber

type StatusProber struct {
	// contains filtered or unexported fields

StatusProber provides a way to check if a VirtualService is ready by probing the Envoy pods handling that VirtualService.

func NewStatusProber

func NewStatusProber(
	logger *zap.SugaredLogger,
	gatewayLister istiolisters.GatewayLister,
	endpointsLister corev1listers.EndpointsLister,
	serviceLister corev1listers.ServiceLister,
	readyCallback func(*v1alpha1.Ingress)) *StatusProber

NewStatusProber creates a new instance of StatusProber

func (*StatusProber) CancelPodProbing

func (m *StatusProber) CancelPodProbing(pod *corev1.Pod)

CancelPodProbing cancels probing of the provided Pod IP.

func (*StatusProber) CancelVirtualServiceProbing

func (m *StatusProber) CancelVirtualServiceProbing(vs *v1alpha3.VirtualService)

CancelVirtualServiceProbing cancels probing of the provided VirtualService.

func (*StatusProber) IsReady

IsReady checks if the provided Ingress is ready, i.e. the Envoy pods serving the Ingress have all been updated. This function is designed to be used by the Ingress controller, i.e. it will be called in the order of reconciliation. This means that if IsReady is called on an Ingress, this Ingress is the latest known version and therefore anything related to older versions can be ignored. Also, it means that IsReady is not called concurrently.

func (*StatusProber) Start

func (m *StatusProber) Start(done <-chan struct{})

Start starts the StatusManager background operations


Path Synopsis

Jump to

Keyboard shortcuts

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