Documentation ¶
Index ¶
- func FilterVictimsPods(fwh handle.PodFrameworkHandle, pfw framework.SchedulerPreemptionFramework, ...) (potentialVictims []*v1.Pod)
- func GetDeployLister(informerFactory informers.SharedInformerFactory) appv1listers.DeploymentLister
- func GetPDBLister(informerFactory informers.SharedInformerFactory) policylisters.PodDisruptionBudgetLister
- func GetPVCLister(informerFactory informers.SharedInformerFactory) corelisters.PersistentVolumeClaimLister
- func GetPcLister(informerFactory informers.SharedInformerFactory) schedulingv1listers.PriorityClassLister
- func GetPgLister(crdInformerFactory crdinformers.SharedInformerFactory) alpha1.PodGroupLister
- func GetPodDisruptionBudgets(pdbLister policylisters.PodDisruptionBudgetLister) ([]*policy.PodDisruptionBudget, error)
- func GetPodGroupLister(crdInformerFactory crdinformers.SharedInformerFactory) alpha1.PodGroupLister
- func GetPodLister(informerFactory informers.SharedInformerFactory) corelisters.PodLister
- func GetPodPartitionPriority(pod *v1.Pod) int64
- func GetSCLister(informerFactory informers.SharedInformerFactory) storagelisters.StorageClassLister
- func HeuristicCheck(handle handle.PodFrameworkHandle, pod *v1.Pod, node framework.NodeInfo) bool
- func OccupiableResourcesCheck(priority int64, podResourceType podutil.PodResourceType, ...) bool
- func PodEligibleToPreemptOthers(pod *v1.Pod, pcLister schedulingv1listers.PriorityClassLister) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FilterVictimsPods ¶
func FilterVictimsPods( fwh handle.PodFrameworkHandle, 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 GetPDBLister ¶
func GetPDBLister(informerFactory informers.SharedInformerFactory) policylisters.PodDisruptionBudgetLister
func GetPVCLister ¶
func GetPVCLister(informerFactory informers.SharedInformerFactory) corelisters.PersistentVolumeClaimLister
func GetPcLister ¶
func GetPcLister(informerFactory informers.SharedInformerFactory) schedulingv1listers.PriorityClassLister
func GetPgLister ¶
func GetPgLister(crdInformerFactory crdinformers.SharedInformerFactory) alpha1.PodGroupLister
func GetPodDisruptionBudgets ¶
func GetPodDisruptionBudgets(pdbLister policylisters.PodDisruptionBudgetLister) ([]*policy.PodDisruptionBudget, error)
func GetPodGroupLister ¶
func GetPodGroupLister(crdInformerFactory crdinformers.SharedInformerFactory) alpha1.PodGroupLister
func GetPodLister ¶
func GetPodLister(informerFactory informers.SharedInformerFactory) corelisters.PodLister
func GetPodPartitionPriority ¶
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 GetSCLister ¶
func GetSCLister(informerFactory informers.SharedInformerFactory) storagelisters.StorageClassLister
func HeuristicCheck ¶
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 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.