Documentation ¶
Index ¶
- func ConstructNominatedNode(nominatedNodeName string, victims *framework.Victims) *framework.NominatedNode
- func CreateScheduleUnit(pcLister schedulingv1.PriorityClassLister, pgLister v1alpha1.PodGroupLister, ...) (framework.ScheduleUnit, error)
- func GetEarliestPodStartTime(victims *framework.Victims) *metav1.Time
- func GetNodeNameFromPod(pod *v1.Pod) string
- func GetPodNominatedNode(pod *v1.Pod) (*framework.NominatedNode, error)
- func GetPotentialVictims(pod *v1.Pod) (*framework.PotentialVictims, error)
- func GetUnitIdentifier(pod *v1.Pod) string
- func GetUnitType(pod *v1.Pod) framework.ScheduleUnitType
- func PodBelongToUnit(pod *v1.Pod) bool
- func SchedSleep(duration time.Duration)
- func SetPodNominatedNode(pod *v1.Pod, nominatedNode *framework.NominatedNode) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConstructNominatedNode ¶
func ConstructNominatedNode(nominatedNodeName string, victims *framework.Victims) *framework.NominatedNode
func CreateScheduleUnit ¶
func CreateScheduleUnit(pcLister schedulingv1.PriorityClassLister, pgLister v1alpha1.PodGroupLister, info *framework.QueuedPodInfo) (framework.ScheduleUnit, error)
CreateScheduleUnit create a unit object from the pod.
func GetEarliestPodStartTime ¶
GetEarliestPodStartTime returns the earliest start time of all pods that have the highest priority among all victims.
func GetNodeNameFromPod ¶
GetNodeNameFromPod returns the name of node where pod is assumed to be placed on, based on following rules: 1. NodeName should be Pod.Spec.NodeName if Pod.Spec.NodeName is set 2. NodeName should be Pod.Annotations[AssumedNodeAnnotationKey] if Pod.Annotations[AssumedNodeAnnotationKey] is set 3. NodeName should be Pod.Annotations[NominatedNodeAnnotationKey] if Pod.Annotations[NominatedNodeAnnotationKey] is set 4. NodeName should be ""
func GetPodNominatedNode ¶
func GetPodNominatedNode(pod *v1.Pod) (*framework.NominatedNode, error)
func GetPotentialVictims ¶
func GetPotentialVictims(pod *v1.Pod) (*framework.PotentialVictims, error)
GetPotentialVictims return potential victims of the given pod, from annotation potentialVictims
func GetUnitIdentifier ¶
GetUnitIdentifier return id of the unit.
func GetUnitType ¶
func GetUnitType(pod *v1.Pod) framework.ScheduleUnitType
GetUnitType return unit type of the pod. This method assumes pod belongs to unit
func PodBelongToUnit ¶
PodBelongToUnit check whether or not pod belongs to unit.
func SchedSleep ¶
SchedSleep help to reduce the failures caused by golang scheduler which cannot schedule goroutines fast enough during unittests when coverage is enabled.
func SetPodNominatedNode ¶
func SetPodNominatedNode(pod *v1.Pod, nominatedNode *framework.NominatedNode) error
SetPodNominatedNode nominatedNode is supposed to be checked before call SetPodNominatedNode
Types ¶
This section is empty.