controller

package
v1.1.9 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2020 License: MIT Imports: 11 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
}

Controller is the controller service.

func NewController

func NewController(m model.Model) (*Controller, error)

NewController creates Controller

func (*Controller) ScanLoop added in v1.1.0

func (c *Controller) ScanLoop(ctx context.Context, scanInterval, addressExpiration time.Duration) error

ScanLoop scans IP address assignment table and Pods information periodically.

func (*Controller) Sync

func (c *Controller) Sync(ctx context.Context) (rev string, err error)

Sync retrieves all existing Node from Kubernetes API server then look for nodes that exist only in the coil database. Address blocks and IP addresses allocated to such deleted nodes are then released.

The function returns ResourceVersion rev for use in Watch().

func (*Controller) Watch

func (c *Controller) Watch(ctx context.Context, rev string) error

Watch watches Kubernetes API server to be informed of node deletions. When a node is deleted from Kubernetes, the controller frees address blocks and IP addresses allocated to the node soon.

Jump to

Keyboard shortcuts

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