mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-21 18:11:22 +00:00
scheduler: make Profile an interface.
This commit is contained in:
@@ -205,14 +205,14 @@ func (sched *Scheduler) deletePodFromSchedulingQueue(obj interface{}) {
|
||||
if err := sched.SchedulingQueue.Delete(pod); err != nil {
|
||||
utilruntime.HandleError(fmt.Errorf("unable to dequeue %T: %v", obj, err))
|
||||
}
|
||||
prof, err := sched.profileForPod(pod)
|
||||
fwk, err := sched.frameworkForPod(pod)
|
||||
if err != nil {
|
||||
// This shouldn't happen, because we only accept for scheduling the pods
|
||||
// which specify a scheduler name that matches one of the profiles.
|
||||
klog.Error(err)
|
||||
return
|
||||
}
|
||||
prof.Framework.RejectWaitingPod(pod.UID)
|
||||
fwk.RejectWaitingPod(pod.UID)
|
||||
}
|
||||
|
||||
func (sched *Scheduler) addPodToCache(obj interface{}) {
|
||||
|
Reference in New Issue
Block a user