ingress

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2019 License: Apache-2.0 Imports: 51 Imported by: 0

Documentation

Overview

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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewController

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

NewController works as a constructor for Ingress Controller

Types

type Reconciler

type Reconciler struct {
	*reconciler.Base
	// contains filtered or unexported fields
}

Reconciler implements the control loop for the Ingress resources.

func (*Reconciler) GetIstioClient added in v0.11.0

func (r *Reconciler) GetIstioClient() istioclientset.Interface

GetIstioClient returns the client to access Istio resources.

func (*Reconciler) GetKubeClient added in v0.11.0

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

GetKubeClient returns the client to access k8s resources.

func (*Reconciler) GetSecretLister added in v0.11.0

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

GetSecretLister returns the lister for Secret.

func (*Reconciler) GetVirtualServiceLister added in v0.11.0

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 added in v0.10.0

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

CancelPodProbing cancels probing of the provided Pod IP.

func (*StatusProber) CancelVirtualServiceProbing added in v0.10.0

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

Directories

Path Synopsis
Package config holds the typed objects that define the schemas for assorted ConfigMap objects on which the Ingress controller depends.
Package config holds the typed objects that define the schemas for assorted ConfigMap objects on which the Ingress controller depends.
Package resources holds simple functions for synthesizing child resources from an Ingress resource and any relevant Ingress controller configuration.
Package resources holds simple functions for synthesizing child resources from an Ingress resource and any relevant Ingress controller configuration.
names
Package names holds simple functions for synthesizing resource names.
Package names holds simple functions for synthesizing resource names.

Jump to

Keyboard shortcuts

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