Documentation ¶
Index ¶
- Constants
- func AddSource(key string, object interface{}) error
- func CordonOrUnCordon(nodeName string, drain bool) (*v1.Node, error)
- func CreatK8sNodeFromRainbonNode(rainbondNode *model.HostNode) (*v1.Node, error)
- func CreateK8sNode(node *model.HostNode) (*v1.Node, error)
- func DeleteNode(nodename string) error
- func DeleteOrEvictPodsSimple(nodeName string) error
- func DeleteSource(key string) error
- func GetNodeByName(nodename string) (*v1.Node, error)
- func GetPodsByNodeName(nodeName string) (pods []v1.Pod, err error)
- func GetSource(key string) (node *model.HostNode, err error)
- func GetSourceList() ([]*model.HostNode, error)
- func LabelMulti(k8sNodeName string, keys []string) error
- func MarkLabel(k8sNodeName, key, value string) error
- func NewK8sClient(cfg *option.Conf) error
- func SupportEviction(clientset *kubernetes.Clientset) (string, error)
- func UpdateLabels(nodeName string, labels map[string]string) (*v1.Node, error)
- type Client
Constants ¶
View Source
const ( Force = true IgnoreDaemonsets = true DeleteLocalData = true EvictionKind = "Eviction" EvictionSubresource = "pods/eviction" )
Variables ¶
This section is empty.
Functions ¶
func CordonOrUnCordon ¶
CordonOrUnCordon 节点是否调度属性处理 drain:true 不可调度
func CreatK8sNodeFromRainbonNode ¶
CreatK8sNodeFromRainbonNode 创建k8s node
func DeleteOrEvictPodsSimple ¶
DeleteOrEvictPodsSimple 驱逐Pod
func DeleteSource ¶
func GetSourceList ¶
func LabelMulti ¶
func SupportEviction ¶
func SupportEviction(clientset *kubernetes.Clientset) (string, error)
SupportEviction uses Discovery API to find out if the server support eviction subresource If support, it will return its groupVersion; Otherwise, it will return ""
Types ¶
Click to show internal directories.
Click to hide internal directories.