Documentation ¶
Overview ¶
Package ingress implements a kubernetes controller which tracks Ingress resource and reconcile VirtualService as its child resource.
Index ¶
- func NewController(ctx context.Context, cmw configmap.Watcher) *controller.Impl
- type Reconciler
- func (r *Reconciler) GetIstioClient() istioclientset.Interface
- func (r *Reconciler) GetKubeClient() kubernetes.Interface
- func (r *Reconciler) GetSecretLister() corev1listers.SecretLister
- func (r *Reconciler) GetVirtualServiceLister() istiolisters.VirtualServiceLister
- func (r *Reconciler) Reconcile(ctx context.Context, key string) error
- type StatusManager
- type StatusProber
- func (m *StatusProber) CancelPodProbing(pod *corev1.Pod)
- func (m *StatusProber) CancelVirtualServiceProbing(vs *v1alpha3.VirtualService)
- func (m *StatusProber) IsReady(ia *v1alpha1.Ingress, gw map[v1alpha1.IngressVisibility]sets.String) (bool, error)
- func (m *StatusProber) Start(done <-chan struct{})
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewController ¶
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.
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 ¶
func (m *StatusProber) IsReady(ia *v1alpha1.Ingress, gw map[v1alpha1.IngressVisibility]sets.String) (bool, error)
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. |