preemptionplugins

package
v0.0.0-...-dcfb068 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FilterVictimsPods

func FilterVictimsPods(
	fwh framework.SchedulerFrameworkHandle,
	pfw framework.SchedulerPreemptionFramework,
	state *framework.CycleState,
	preemptionState *framework.CycleState,
	nodeInfo framework.NodeInfo,
	preemptor *v1.Pod,
	priorityLower, priorityUpper int64,
	checked bool,
) (potentialVictims []*v1.Pod)

filterVictimsPods groups the given "pods" into two groups of "violatingPods" and "nonViolatingPods" based on whether their PDBs will be violated if they are preempted. This function is stable and does not change the order of received pods. So, if it receives a sorted list, grouping will preserve the order of the input list.

func GetDeployLister

func GetDeployLister(informerFactory informers.SharedInformerFactory) appv1listers.DeploymentLister

func GetPgLister

func GetPgLister(crdInformerFactory crdinformers.SharedInformerFactory) alpha1.PodGroupLister

func GetPodGroupLister

func GetPodGroupLister(crdInformerFactory crdinformers.SharedInformerFactory) alpha1.PodGroupLister

func GetPodLister

func GetPodLister(informerFactory informers.SharedInformerFactory) corelisters.PodLister

func GetPodPartitionPriority

func GetPodPartitionPriority(pod *v1.Pod) int64

ATTENTION: This function is only used when filtering victim candidates. GetPodPartitionPriority returns a priority value based on the current cluster status, which needs to be bigger than of all potentially victims's priority.

func HeuristicCheck

func HeuristicCheck(handle framework.SchedulerFrameworkHandle, pod *v1.Pod, node framework.NodeInfo) bool

Before performing the real preemption calculation, we perform heuristic check to end the preemption process in advance in some scenarios. Ref: https://en.wikipedia.org/wiki/Heuristic_(computer_science)

func OccupiableResourcesCheck

func OccupiableResourcesCheck(priority int64, podResourceType podutil.PodResourceType, podResource framework.Resource, node framework.NodeInfo) bool

func PodEligibleToPreemptOthers

func PodEligibleToPreemptOthers(pod *v1.Pod, pcLister schedulingv1listers.PriorityClassLister) bool

PodEligibleToPreemptOthers determines whether this pod should be considered for preempting other pods or not. If this pod has already preempted other pods and those are in their graceful termination period, it shouldn't be considered for preemption. We look at the node that is nominated for this pod and as long as there are terminating pods on the node, we don't consider this for preempting more pods.

Types

This section is empty.

Jump to

Keyboard shortcuts

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