Documentation
¶
Index ¶
Constants ¶
View Source
const Name = "resources"
Name is the registry key for this scanner.
Variables ¶
This section is empty.
Functions ¶
func NewScanner ¶
NewScanner returns a scanner that collects node resource and condition data.
Types ¶
type Data ¶
type Data struct {
// NodeCount is the total number of nodes.
NodeCount int `json:"node_count"`
// ReadyNodes is how many nodes report Ready=True.
ReadyNodes int `json:"ready_nodes"`
// UnschedulableNodes is how many are cordoned.
UnschedulableNodes int `json:"unschedulable_nodes"`
// TotalAllocatableCPU is the sum of allocatable CPU across all nodes.
TotalAllocatableCPU string `json:"total_allocatable_cpu"`
// TotalAllocatableMemory is the sum of allocatable memory across all nodes.
TotalAllocatableMemory string `json:"total_allocatable_memory"`
// Nodes lists per-node resource details.
Nodes []NodeInfo `json:"nodes"`
}
Data holds resource information for one cluster.
type NodeInfo ¶
type NodeInfo struct {
// Name is the node name.
Name string `json:"name"`
// AllocatableCPU is the allocatable CPU in millicores.
AllocatableCPU string `json:"allocatable_cpu"`
// AllocatableMemory is the allocatable memory.
AllocatableMemory string `json:"allocatable_memory"`
// CapacityCPU is the total CPU capacity.
CapacityCPU string `json:"capacity_cpu"`
// CapacityMemory is the total memory capacity.
CapacityMemory string `json:"capacity_memory"`
// Conditions lists active conditions and their statuses.
Conditions map[string]string `json:"conditions"`
// Unschedulable is true when the node is cordoned.
Unschedulable bool `json:"unschedulable"`
}
NodeInfo describes resource capacity and conditions for a single node.
Click to show internal directories.
Click to hide internal directories.