controller

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: May 13, 2024 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NodeControllerClientName = "node-controller"

	NodeControllerKey = "label-taint"
)

Variables

This section is empty.

Functions

func NodeHealth

func NodeHealth(node v1.Node) bool

func NodeIP

func NodeIP(node v1.Node) (string, error)

func NodeReady

func NodeReady(node v1.Node) bool

func NodeUnreachable

func NodeUnreachable(node v1.Node) bool

func UpdateNode

func UpdateNode(node *v1.Node, detail *commoneks.NodeCCMInitResponseData) (bool, error)

UpdateNode 设置节点的污点

func UpdateNodeAnnotations

func UpdateNodeAnnotations(node *v1.Node, detail *commoneks.NodeCCMInitResponseData) bool

UpdateNodeAnnotations 修改节点的污点

func UpdateNodeLabels

func UpdateNodeLabels(node *v1.Node, detail *commoneks.NodeCCMInitResponseData) bool

UpdateNodeLabels 更新节点标签

func UpdateNodeTaints

func UpdateNodeTaints(node *v1.Node, detail *commoneks.NodeCCMInitResponseData) bool

UpdateNodeTaints 修改节点的污点

Types

type ControllerWrapper

type ControllerWrapper struct {
}

func (*ControllerWrapper) StartNodeControllerWrapper

func (c *ControllerWrapper) StartNodeControllerWrapper(initContext app.ControllerInitContext, completedConfig *cloudcontrollerconfig.CompletedConfig, cloud cloudprovider.Interface) app.InitFunc

type NodeController

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

func NewNodeController

func NewNodeController() NodeController

func (*NodeController) CalculateLoad

func (n *NodeController) CalculateLoad(metric v1beta1.NodeMetrics, node v1.Node) (commoneks.NodeLoad, error)

func (*NodeController) CollectPlayLoad

func (n *NodeController) CollectPlayLoad(ctx context.Context) error

CollectPlayLoad 获取集群节点的负载信息

func (*NodeController) ListenNodes

func (n *NodeController) ListenNodes(ctx context.Context)

func (*NodeController) NotifyNodeDown

func (n *NodeController) NotifyNodeDown(ctx context.Context, event *v1.Event)

func (*NodeController) NotifyNodeReady

func (n *NodeController) NotifyNodeReady(ctx context.Context, event *v1.Event)

func (*NodeController) Run

func (n *NodeController) Run(ctx context.Context) error

func (*NodeController) Update

func (n *NodeController) Update(ctx context.Context) error

func (*NodeController) Validate

func (n *NodeController) Validate() error

Jump to

Keyboard shortcuts

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