nodes

package
v0.3.4 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

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"`
	FractionCpuReqs                float64            `json:"cpu_reqs"`
	FractionCpuLimits              float64            `json:"cpu_limits"`
	FractionMemoryReqs             float64            `json:"memory_reqs"`
	FractionMemoryLimits           float64            `json:"memory_limits"`
	FractionEphemeralStorageReqs   float64            `json:"ephemeral_storage_reqs"`
	FractionEphemeralStorageLimits float64            `json:"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