status

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: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Manager

type Manager interface {
	IsReady(ctx context.Context, ing *v1alpha1.Ingress) (bool, error)
}

Manager provides a way to check if an Ingress is ready

type ProbeTarget

type ProbeTarget struct {
	PodIPs  sets.String
	PodPort string
	Port    string
	URLs    []*url.URL
}

ProbeTarget contains the URLs to probes for a set of Pod IPs serving out of the same port.

type ProbeTargetLister

type ProbeTargetLister interface {
	// ListProbeTargets returns a list of targets to be probed.
	ListProbeTargets(ctx context.Context, ingress *v1alpha1.Ingress) ([]ProbeTarget, error)
}

ProbeTargetLister lists all the targets that requires probing.

type Prober

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

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

func NewProber

func NewProber(
	logger *zap.SugaredLogger,
	targetLister ProbeTargetLister,
	readyCallback func(*v1alpha1.Ingress)) *Prober

NewProber creates a new instance of Prober

func (*Prober) CancelIngressProbing

func (m *Prober) CancelIngressProbing(obj interface{})

CancelIngressProbing cancels probing of the provided Ingress TODO(#6270): Use cache.DeletedFinalStateUnknown.

func (*Prober) CancelPodProbing

func (m *Prober) CancelPodProbing(obj interface{})

CancelPodProbing cancels probing of the provided Pod IP.

TODO(#6269): make this cancellation based on Pod x port instead of just Pod.

func (*Prober) IsReady

func (m *Prober) IsReady(ctx context.Context, ing *v1alpha1.Ingress) (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 (*Prober) Start

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

Start starts the Manager background operations

Jump to

Keyboard shortcuts

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