handler

package
v0.5.13 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2024 License: Apache-2.0 Imports: 17 Imported by: 1

Documentation

Index

Constants

View Source
const AgentHandlerGeneric = "generic"

Variables

This section is empty.

Functions

func GetRegisterAgentHandlerFuncs

func GetRegisterAgentHandlerFuncs() map[string]InitFunc

func RegisterAgentHandlerFunc

func RegisterAgentHandlerFunc(name string, f InitFunc)

Types

type AgentHandler

type AgentHandler interface {
	// GetEvictionInfo returns eviction item for the given node-name
	GetEvictionInfo(node string) (*helper.EvictItem, bool)

	// GetCNRTaintInfo returns a map mapping for the given node-name
	GetCNRTaintInfo(node string) (*helper.CNRTaintItem, bool)
}

AgentHandler defines the standard interface to handle unhealthy states for each individual agent

func NewGenericAgentHandler

func NewGenericAgentHandler(ctx context.Context, agent string, emitter metrics.MetricEmitter,
	genericConf *generic.GenericConfiguration, _ *controller.LifeCycleConfig, nodeSelector labels.Selector,
	podIndexer cache.Indexer, nodeLister corelisters.NodeLister, cnrLister listers.CustomNodeResourceLister,
	checker *helper.HealthzHelper,
) AgentHandler

type GenericAgentHandler

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

GenericAgentHandler implements AgentHandler with generic actions: i.e. taint cnr and trigger eviction for reclaimed_cores

func (*GenericAgentHandler) GetCNRTaintInfo

func (g *GenericAgentHandler) GetCNRTaintInfo(nodeName string) (*helper.CNRTaintItem, bool)

func (*GenericAgentHandler) GetEvictionInfo

func (g *GenericAgentHandler) GetEvictionInfo(nodeName string) (*helper.EvictItem, bool)

Jump to

Keyboard shortcuts

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