strategies

package
v0.0.0-...-4581850 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsNodeAboveTargetUtilization

func IsNodeAboveTargetUtilization(nodeThresholds api.ResourceThresholds, thresholds api.ResourceThresholds) bool

func IsNodeWithLowUtilization

func IsNodeWithLowUtilization(nodeThresholds api.ResourceThresholds, thresholds api.ResourceThresholds) bool

func NodeUtilization

func NodeUtilization(node *v1.Node, pods []*v1.Pod, evictLocalStoragePods bool) (api.ResourceThresholds, []*v1.Pod, []*v1.Pod, []*v1.Pod, []*v1.Pod, []*v1.Pod)

Nodeutilization returns the current usage of node.

func SortNodesByUsage

func SortNodesByUsage(nodes []NodeUsageMap, resourcename v1.ResourceName)

Types

type NodePodsMap

type NodePodsMap map[*v1.Node][]*v1.Pod

func CreateNodePodsMap

func CreateNodePodsMap(client clientset.Interface, nodes []*v1.Node) NodePodsMap

createNodePodsMap returns nodepodsmap with evictable pods on node.

type NodeUsageMap

type NodeUsageMap struct {
	Node  *v1.Node
	Usage api.ResourceThresholds

	SIsNodeUschedulable bool
	SIsShare            bool
	// contains filtered or unexported fields
}

func GetNodeUsage

func GetNodeUsage(npm NodePodsMap, evictLocalStoragePods bool) []NodeUsageMap

Jump to

Keyboard shortcuts

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