strategies

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2018 License: Apache-2.0 Imports: 14 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 LowNodeUtilization

func LowNodeUtilization(ds *options.DeschedulerServer, strategy api.DeschedulerStrategy, evictionPolicyGroupVersion string, nodes []*v1.Node)

func NodeUtilization

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

func RemoveDuplicatePods

func RemoveDuplicatePods(ds *options.DeschedulerServer, strategy api.DeschedulerStrategy, policyGroupVersion string, nodes []*v1.Node)

RemoveDuplicatePods removes the duplicate pods on node. This strategy evicts all duplicate pods on node. A pod is said to be a duplicate of other if both of them are from same creator, kind and are within the same namespace. As of now, this strategy won't evict daemonsets, mirror pods, critical pods and pods with local storages.

func RemovePodsViolatingInterPodAntiAffinity added in v0.3.0

func RemovePodsViolatingInterPodAntiAffinity(ds *options.DeschedulerServer, strategy api.DeschedulerStrategy, policyGroupVersion string, nodes []*v1.Node)

RemovePodsViolatingInterPodAntiAffinity with elimination strategy

func SortNodesByUsage

func SortNodesByUsage(nodes []NodeUsageMap)

Types

type DuplicatePodsMap

type DuplicatePodsMap map[string][]*v1.Pod

type creator string

func FindDuplicatePods

func FindDuplicatePods(pods []*v1.Pod) DuplicatePodsMap

FindDuplicatePods takes a list of pods and returns a duplicatePodsMap.

func ListDuplicatePodsOnANode

func ListDuplicatePodsOnANode(client clientset.Interface, node *v1.Node) DuplicatePodsMap

ListDuplicatePodsOnANode lists duplicate pods on a given node.

type NodePodsMap

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

func CreateNodePodsMap

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

type NodeUsageMap

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

Jump to

Keyboard shortcuts

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