autoregistration

package
v0.0.0-...-33ef25c Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2024 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Controller

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

func NewController

func NewController(store model.ConfigStoreController, instanceID string, maxConnAge time.Duration) *Controller

NewController create a controller which manages workload lifecycle and health status.

func (*Controller) IsControllerOf

func (c *Controller) IsControllerOf(wle *config.Config) bool

IsControllerOf implements state.StoreCallbacks.

func (*Controller) OnConnect

func (c *Controller) OnConnect(conn connection) error

OnConnect determines whether a connecting proxy represents a non-Kubernetes workload and, if that's the case, initiates special processing required for that type of workloads, such as auto-registration, health status updates, etc.

If connecting proxy represents a workload that is using auto-registration, it will create a WorkloadEntry resource automatically and be ready to receive health status updates.

If connecting proxy represents a workload that is not using auto-registration, the WorkloadEntry resource is expected to exist beforehand. Otherwise, no special processing will be initiated, e.g. health status updates will be ignored.

func (*Controller) OnDisconnect

func (c *Controller) OnDisconnect(conn connection)

OnDisconnect determines whether a connected proxy represents a non-Kubernetes workload and, if that's the case, terminates special processing required for that type of workloads, such as auto-registration, health status updates, etc.

If proxy represents a workload (be it auto-registered or not), WorkloadEntry resource will be updated to reflect that the proxy is no longer connected to this particular `istiod` instance.

Besides that, if proxy represents a workload that is using auto-registration, WorkloadEntry resource will be scheduled for removal if the proxy does not reconnect within a grace period.

If proxy represents a workload that is not using auto-registration, WorkloadEntry resource will be scheduled to be marked unhealthy if the proxy does not reconnect within a grace period.

func (*Controller) QueueWorkloadEntryHealth

func (c *Controller) QueueWorkloadEntryHealth(proxy *model.Proxy, event HealthEvent)

QueueWorkloadEntryHealth enqueues the associated WorkloadEntries health status.

func (*Controller) Run

func (c *Controller) Run(stop <-chan struct{})

type HealthEvent

type HealthEvent = health.HealthEvent

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

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