node

package
v0.0.110 Latest Latest
Warning

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

Go to latest
Published: May 13, 2025 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var WebsocketMessageType = map[int]string{
	websocket.BinaryMessage: "binary",
	websocket.TextMessage:   "text",
	websocket.CloseMessage:  "close",
	websocket.PingMessage:   "ping",
	websocket.PongMessage:   "pong",
}

Functions

func AddTaint added in v0.0.27

func AddTaint(c *gin.Context)

AddTaint 添加污点

func AllLabelList added in v0.0.27

func AllLabelList(c *gin.Context)

AllLabelList 获取所有节点上的标签

func AllTaintList added in v0.0.27

func AllTaintList(c *gin.Context)

AllTaintList 获取所有节点上的污点

func BatchCordon added in v0.0.22

func BatchCordon(c *gin.Context)

BatchCordon 批量将指定的 Kubernetes 节点设置为不可调度(cordon)。 接收包含节点名称列表的 JSON 请求体,逐个节点执行 cordon 操作,若有节点操作失败则返回错误,否则返回操作成功。

func BatchDrain added in v0.0.22

func BatchDrain(c *gin.Context)

BatchDrain 批量驱逐指定的 Kubernetes 节点。 从请求体获取节点名称列表,依次对每个节点执行驱逐操作,若有任一节点驱逐失败,则返回错误,否则返回操作成功。

func BatchUnCordon added in v0.0.22

func BatchUnCordon(c *gin.Context)

BatchUnCordon 批量解除指定节点的隔离状态(Uncordon),使其重新可调度。 从请求体中读取节点名称列表,对每个节点执行解除隔离操作。若有任一节点操作失败,将返回错误信息,否则返回操作成功。

func Cordon

func Cordon(c *gin.Context)

func CreateKubectlShell added in v0.0.44

func CreateKubectlShell(c *gin.Context)

func CreateNodeShell added in v0.0.44

func CreateNodeShell(c *gin.Context)

func DeleteTaint added in v0.0.27

func DeleteTaint(c *gin.Context)

DeleteTaint 删除污点

func Drain

func Drain(c *gin.Context)

func ListTaint added in v0.0.27

func ListTaint(c *gin.Context)

ListTaint 获取某个节点上的污点

func NameOptionList added in v0.0.23

func NameOptionList(c *gin.Context)

func TopList added in v0.0.100

func TopList(c *gin.Context)

TopList 返回所有节点的资源使用率(top指标),包括CPU和内存的用量及其数值化表示,便于前端排序和展示。

func UnCordon

func UnCordon(c *gin.Context)

func UniqueLabels added in v0.0.49

func UniqueLabels(c *gin.Context)

UniqueLabels 获取选定集群中所有唯一的节点标签键,并以选项列表形式返回。

func UpdateTaint added in v0.0.27

func UpdateTaint(c *gin.Context)

UpdateTaint 修改污点

func Usage added in v0.0.18

func Usage(c *gin.Context)

Types

type TaintInfo added in v0.0.27

type TaintInfo struct {
	Key    string `json:"key"`
	Value  string `json:"value"`
	Effect string `json:"effect"`
}

Jump to

Keyboard shortcuts

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