controller

package
v1.24.3 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2022 License: Apache-2.0 Imports: 21 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 ...

func NewController

func NewController(conf config.Config) *Controller

NewController creates a new autohealer controller.

func (*Controller) GetLeaderElectionLock

func (c *Controller) GetLeaderElectionLock() (resourcelock.Interface, error)

func (*Controller) Start

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

Start starts the autohealing controller.

func (*Controller) UpdateNodeAnnotation

func (c *Controller) UpdateNodeAnnotation(node healthcheck.NodeInfo, annotation string, value string) error

UpdateNodeAnnotation updates the specified node annotation, if value equals empty string, the annotation will be removed. This implements the interface healthcheck.NodeController

type Event

type Event struct {
	Type EventType
	Obj  interface{}
}

Event holds the context of an event

type EventType

type EventType string

EventType type of event associated with an informer

const (

	// CreateEvent event associated with new objects in an informer
	CreateEvent EventType = "CREATE"
	// UpdateEvent event associated with an object update in an informer
	UpdateEvent EventType = "UPDATE"
	// DeleteEvent event associated when an object is removed from an informer
	DeleteEvent EventType = "DELETE"

	// LabelNodeRoleMaster specifies that a node is a master
	// Related discussion: https://github.com/kubernetes/kubernetes/pull/39112
	// TODO: remove >= k8s 1.25
	LabelNodeRoleMaster = "node-role.kubernetes.io/master"

	// LabelNodeRoleControlPlane specifies that a node is control-plane
	LabelNodeRoleControlPlane = "node-role.kubernetes.io/control-plane"
)

Jump to

Keyboard shortcuts

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