Documentation
¶
Index ¶
- func EvictionCost(p1, p2 *corev1.Pod) int
- func KoordinatorPriorityClass(p1, p2 *corev1.Pod) int
- func KoordinatorQoSClass(p1, p2 *corev1.Pod) int
- func KubernetesQoSClass(p1, p2 *corev1.Pod) int
- func PodCreationTimestamp(p1, p2 *corev1.Pod) int
- func PodDeletionCost(p1, p2 *corev1.Pod) int
- func Priority(p1, p2 *corev1.Pod) int
- func ResourceUsageScorer(resToWeightMap map[corev1.ResourceName]int64) func(requested, allocatable corev1.ResourceList) int64
- func SortPodsByUsage(pods []*corev1.Pod, ...)
- type CompareFn
- type MultiSorter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EvictionCost ¶
func KoordinatorPriorityClass ¶
KoordinatorPriorityClass compares pods by the Koordinator PriorityClass
func KoordinatorQoSClass ¶
KoordinatorQoSClass compares pods by the Koordinator QoSClass
func KubernetesQoSClass ¶
KubernetesQoSClass compares pods by Kubernetes QosClass
func PodCreationTimestamp ¶
PodCreationTimestamp compares the pods by the creation timestamp
func PodDeletionCost ¶
func ResourceUsageScorer ¶
func ResourceUsageScorer(resToWeightMap map[corev1.ResourceName]int64) func(requested, allocatable corev1.ResourceList) int64
func SortPodsByUsage ¶
func SortPodsByUsage(pods []*corev1.Pod, podMetrics map[types.NamespacedName]*slov1alpha1.ResourceMap, nodeAllocatableMap map[string]corev1.ResourceList, resourceToWeightMap map[corev1.ResourceName]int64)
Types ¶
type CompareFn ¶
CompareFn compares p1 and p2 and returns:
-1 if p1 < p2 0 if p1 == p2 +1 if p1 > p2
func PodUsage ¶
func PodUsage(podMetrics map[types.NamespacedName]*slov1alpha1.ResourceMap, nodeAllocatableMap map[string]corev1.ResourceList, resourceToWeightMap map[corev1.ResourceName]int64) CompareFn
PodUsage compares pods by the actual usage
type MultiSorter ¶
type MultiSorter struct {
// contains filtered or unexported fields
}
MultiSorter implements the Sort interface
func OrderedBy ¶
func OrderedBy(cmp ...CompareFn) *MultiSorter
OrderedBy returns a Sorter sorted using the cmp functions, sorts in ascending order by default
func PodSorter ¶
func PodSorter(cmp ...CompareFn) *MultiSorter
func (*MultiSorter) Ascending ¶
func (ms *MultiSorter) Ascending() *MultiSorter
func (*MultiSorter) Descending ¶
func (ms *MultiSorter) Descending() *MultiSorter
func (*MultiSorter) Less ¶
func (ms *MultiSorter) Less(i, j int) bool
Less is part of sort.Interface.
func (*MultiSorter) Sort ¶
func (ms *MultiSorter) Sort(pods []*corev1.Pod)
Sort sorts the pods according to the cmp functions passed to OrderedBy.
Click to show internal directories.
Click to hide internal directories.