nodes

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NodeDetails added in v0.4.4

type NodeDetails struct {
	NodeWithUsageData
	AllocatableCpu    int64  `json:"allocatable_cpu"`
	AllocatableMemory string `json:"allocatable_memory"`
}

func DescribeNode added in v0.4.4

func DescribeNode(clientset kubernetes.Interface, nodeName string) *NodeDetails

type NodeUsage

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

func DescribeNodeResource

func DescribeNodeResource(nodeNonTerminatedPodsList *corev1.PodList, node *corev1.Node) *NodeUsage

Returns the summatory of resources requested and their limits by a list of pods on a specific node in fraction values.

func (*NodeUsage) Externalize

func (nu *NodeUsage) Externalize(node v1.Node) *NodeWithUsageData

type NodeWithUsageData

type NodeWithUsageData struct {
	Name                           string             `json:"name"`
	Labels                         map[string]string  `json:"labels"`
	CpuReqs                        string             `json:"cpu_reqs"`
	MemoryReqs                     string             `json:"memory_reqs"`
	EphemeralStorageReqs           string             `json:"ephemeral_storage_reqs"`
	FractionCpuReqs                float64            `json:"fraction_cpu_reqs"`
	FractionCpuLimits              float64            `json:"fraction_cpu_limits"`
	FractionMemoryReqs             float64            `json:"fraction_memory_reqs"`
	FractionMemoryLimits           float64            `json:"fraction_memory_limits"`
	FractionEphemeralStorageReqs   float64            `json:"fraction_ephemeral_storage_reqs"`
	FractionEphemeralStorageLimits float64            `json:"fraction_ephemeral_storage_limits"`
	Condition                      []v1.NodeCondition `json:"node_conditions"`
}

func GetNodesUsage

func GetNodesUsage(clientset kubernetes.Interface) []*NodeWithUsageData

Jump to

Keyboard shortcuts

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