controller

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2022 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

View Source
const (
	UpdateEvent eventType = "Update"
	DeleteEvent eventType = "Delete"
	AddEvent    eventType = "Add"
)
View Source
const (
	NPLSResourceType = "npls"
)
View Source
const (
	NodeResourceType = "node"
)

Variables

This section is empty.

Functions

func GetNPLSInformer

GetNPLSInformer creates and gives back a shared NPLS informer and its factory

func GetNodeInformer

GetNodeInformer creates and gives back a shared Node informer and its factory

Types

type Config

type Config struct {
	// Namespace is where the labeler looks for NPLS resources
	Namespace string `mapstructure:"namespace"`
	// NodepoolNameLabels contains label names which are used in order
	// to try to determine the nodepool name the node is part of
	NodepoolNameLabels []string `mapstructure:"nodepoolNameLabels"`
}

type Controller

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

Controller manages node pool labels

func New

func New(config Config, k8sConfig *rest.Config, labeler *labeler.Labeler, logger log.Logger, errorHandler emperror.Handler) (*Controller, error)

New gives back an initialized Controller

func (*Controller) Start

func (c *Controller) Start() error

Start initializes the informers and starts observing them

type Event

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

Event describes a system event

func NewEvent

func NewEvent(resourceType string, eventType eventType, key string) *Event

NewEvent create a new system event

Jump to

Keyboard shortcuts

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