controller

package
v0.0.0-...-9a5d330 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2021 License: MIT Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const CoreV1NodesPlural = "nodes"

CoreV1NodesPlural is the plural for a kubernetes Node

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Namespace         string
	ClusterWide       bool
	ServiceAccount    string
	KubeCli           kubernetes.Interface
	KubeExtCli        apiextensionsclient.Interface
	SensuCRCli        versioned.Interface
	CreateCRD         bool
	WorkerThreads     int
	ProcessingRetries int
	ResyncPeriod      time.Duration
	LogLevel          logrus.Level
}

Config is the configuration for the sensu controller

type Controller

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

Controller is the sensu controller that handles all informers/clusters/finalizers for all of the custom resources in the operator

func New

func New(cfg Config) *Controller

New returns a new sensu controller

func (*Controller) Start

func (c *Controller) Start(ctx context.Context)

Start the controller's informer to watch for custom resource update

type Event

type Event struct {
	Type   kwatch.EventType
	Object *api.SensuCluster
}

Event is the cluster event that pairs the event type (add/update/delete) with the sensu cluster object, and is passed through the controller

type Informer

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

Informer is a kubernetes informer that satisfies the included 3 interfaces

Jump to

Keyboard shortcuts

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