controller

package
v0.8.3 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2020 License: MIT Imports: 14 Imported by: 2

Documentation

Overview

Package controller list and keep watching a specific Kubernetes resource kind (ie. "apps/v1 Deployment", "v1 Namespace", etc) and notifies a recorder whenever a change happens (an object changed, was created, or deleted). This is a generic implementation: the resource kind to watch is provided at runtime. We should start several such controllers to watch for distinct resources.

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 a generic kubernetes controller

func New added in v0.4.0

func New(client cache.ListerWatcher,
	notifier event.Notifier,
	log logger,
	name string,
	selector string,
	resync time.Duration,
	exclusions *Exclusions,
) *Controller

New return a kubernetes controller using the provided client

func (*Controller) Start added in v0.4.0

func (c *Controller) Start()

Start launchs the controller in the background

func (*Controller) Stop added in v0.4.0

func (c *Controller) Stop()

Stop halts the controller

type Exclusions added in v0.8.2

type Exclusions struct {
	Names      []string
	Namespaces []*regexp.Regexp
	NoOwnerRef bool
}

Exclusions groups filters used to ignore objects

type Factory added in v0.4.0

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

Factory generate controllers

func NewFactory added in v0.5.0

func NewFactory(logger logger, selector string, resync int, exclusions *Exclusions) *Factory

NewFactory create a controller factory

func (*Factory) NewController added in v0.4.0

func (f *Factory) NewController(client cache.ListerWatcher, notifier event.Notifier, name string) Interface

NewController create a controller.Controller

type Interface added in v0.4.0

type Interface interface {
	Start()
	Stop()
}

Interface describe a standard kubernetes controller

Jump to

Keyboard shortcuts

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