scheduler/volumebinding: move all volume binding logic into VolumeBinding plugin

This commit is contained in:
Yecheng Fu
2020-05-11 13:21:43 +08:00
parent ba3bf32300
commit c14b749521
17 changed files with 602 additions and 121 deletions

View File

@@ -206,10 +206,6 @@ 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))
}
if sched.VolumeBinder != nil {
// Volume binder only wants to keep unassigned pods
sched.VolumeBinder.DeletePodBindings(pod)
}
prof, err := sched.profileForPod(pod)
if err != nil {
// This shouldn't happen, because we only accept for scheduling the pods