helper

package
v0.3.9 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2023 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

View Source
const NodeNameKeyIndex = "spec.nodeName"
View Source
const TaintNameNoScheduler = "TaintNameNoScheduler"

Variables

Functions

func GetPodsAssignedToNode

func GetPodsAssignedToNode(nodeName string, podIndexer cache.Indexer) ([]*corev1.Pod, error)

GetPodsAssignedToNode returns pods that belong to this node by indexer

Types

type CNRTaintHelper

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

func NewTaintHelper

NewTaintHelper todo add logic here

func (*CNRTaintHelper) Run

func (t *CNRTaintHelper) Run()

func (*CNRTaintHelper) TryUNTaintCNR

func (t *CNRTaintHelper) TryUNTaintCNR(name string) error

TryUNTaintCNR is used to delete taint info from CNR

type CNRTaintItem

type CNRTaintItem struct {
	Taints map[string]*apis.Taint
}

CNRTaintItem records the detailed item to perform cnr-taints

type EvictHelper

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

func NewEvictHelper

NewEvictHelper todo add logic here

func (*EvictHelper) Run

func (e *EvictHelper) Run()

type EvictItem

type EvictItem struct {
	// PodKeys maps from agent-name to pod-keys (that should be evicted because of the Agents)
	PodKeys map[string][]string
}

EvictItem records the detailed item to perform pod eviction

type HealthzHelper

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

func NewHealthzHelper

func NewHealthzHelper(ctx context.Context, conf *controller.LifeCycleConfig, emitter metrics.MetricEmitter,
	nodeSelector labels.Selector, agentSelectors map[string]labels.Selector, podIndexer cache.Indexer,
	nodeLister corelisters.NodeLister, cnrLister listers.CustomNodeResourceLister) *HealthzHelper

NewHealthzHelper todo add logic here

func (*HealthzHelper) CheckAgentReady

func (h *HealthzHelper) CheckAgentReady(node string, agent string) bool

CheckAgentReady checks whether the given agent is ready

func (*HealthzHelper) CheckAllAgentReady

func (h *HealthzHelper) CheckAllAgentReady(node string) bool

CheckAllAgentReady checks whether all agents are ready

func (*HealthzHelper) Run

func (h *HealthzHelper) Run()

Jump to

Keyboard shortcuts

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