Documentation ¶
Index ¶
- func DeleteNode(cli *kubernetes.Clientset, name string) error
- func GetNodeByName(cli *kubernetes.Clientset, name string) (*corev1.Node, error)
- func GetNodeByNameFromInformer(indexer *client.CacheFactory, name string) (*corev1.Node, error)
- func GetNodeCounts(indexer *client.CacheFactory) (int, error)
- func UpdateNode(cli *kubernetes.Clientset, node *corev1.Node) (*corev1.Node, error)
- type Node
- type NodeListResult
- type NodeListSummary
- type NodeSpec
- type NodeStatistics
- type NodeStatus
- type ResourceSummary
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeleteNode ¶
func DeleteNode(cli *kubernetes.Clientset, name string) error
func GetNodeByName ¶
func GetNodeByNameFromInformer ¶
使用 Informer 机制来实现,通过从本地缓存获取node数据
func GetNodeCounts ¶
func GetNodeCounts(indexer *client.CacheFactory) (int, error)
func UpdateNode ¶
Types ¶
type NodeListResult ¶
type NodeListResult struct { NodeSummary NodeListSummary `json:"nodeSummary"` CpuSummary ResourceSummary `json:"cpuSummary"` MemorySummary ResourceSummary `json:"memorySummary"` Nodes []Node `json:"nodes"` }
func ListNode ¶
func ListNode(indexer *client.CacheFactory) (*NodeListResult, error)
type NodeListSummary ¶
type NodeSpec ¶
type NodeSpec struct { Unschedulable bool `json:"unschedulable"` // If specified, the node's taints. // +optional Taints []corev1.Taint `json:"taints,omitempty"` Ready corev1.ConditionStatus `json:"ready"` }
type NodeStatistics ¶
type NodeStatus ¶
type NodeStatus struct { Capacity map[corev1.ResourceName]string `json:"capacity,omitempty"` NodeInfo corev1.NodeSystemInfo `json:"nodeInfo,omitempty"` }
type ResourceSummary ¶
Click to show internal directories.
Click to hide internal directories.