Skip to content

Commit 36d1365

Browse files
committed
update comments in volumescheduling pkg to reflect latest change
1 parent 71277de commit 36d1365

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

pkg/controller/volume/scheduling/scheduler_binder.go

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -71,25 +71,25 @@ type InTreeToCSITranslator interface {
7171
TranslateInTreePVToCSI(pv *v1.PersistentVolume) (*v1.PersistentVolume, error)
7272
}
7373

74-
// SchedulerVolumeBinder is used by the scheduler to handle PVC/PV binding
75-
// and dynamic provisioning. The binding decisions are integrated into the pod scheduling
76-
// workflow so that the PV NodeAffinity is also considered along with the pod's other
77-
// scheduling requirements.
74+
// SchedulerVolumeBinder is used by the scheduler VolumeBinding plugin to
75+
// handle PVC/PV binding and dynamic provisioning. The binding decisions are
76+
// integrated into the pod scheduling workflow so that the PV NodeAffinity is
77+
// also considered along with the pod's other scheduling requirements.
7878
//
79-
// This integrates into the existing default scheduler workflow as follows:
79+
// This integrates into the existing scheduler workflow as follows:
8080
// 1. The scheduler takes a Pod off the scheduler queue and processes it serially:
81-
// a. Invokes all predicate functions, parallelized across nodes. FindPodVolumes() is invoked here.
82-
// b. Invokes all priority functions. Future/TBD
81+
// a. Invokes all filter plugins, parallelized across nodes. FindPodVolumes() is invoked here.
82+
// b. Invokes all score plugins. Future/TBD
8383
// c. Selects the best node for the Pod.
84-
// d. Cache the node selection for the Pod. AssumePodVolumes() is invoked here.
84+
// d. Invokes all reserve plugins. AssumePodVolumes() is invoked here.
8585
// i. If PVC binding is required, cache in-memory only:
8686
// * For manual binding: update PV objects for prebinding to the corresponding PVCs.
8787
// * For dynamic provisioning: update PVC object with a selected node from c)
8888
// * For the pod, which PVCs and PVs need API updates.
8989
// ii. Afterwards, the main scheduler caches the Pod->Node binding in the scheduler's pod cache,
9090
// This is handled in the scheduler and not here.
9191
// e. Asynchronously bind volumes and pod in a separate goroutine
92-
// i. BindPodVolumes() is called first. It makes all the necessary API updates and waits for
92+
// i. BindPodVolumes() is called first in PreBind phase. It makes all the necessary API updates and waits for
9393
// PV controller to fully bind and provision the PVCs. If binding fails, the Pod is sent
9494
// back through the scheduler.
9595
// ii. After BindPodVolumes() is complete, then the scheduler does the final Pod->Node binding.
@@ -832,7 +832,7 @@ func (b *volumeBinder) checkVolumeProvisions(pod *v1.Pod, claimsToProvision []*v
832832
provisionedClaims = append(provisionedClaims, claim)
833833

834834
}
835-
klog.V(4).Infof("Provisioning for claims of pod %q that has no matching volumes on node %q ...", podName, node.Name)
835+
klog.V(4).Infof("Provisioning for %d claims of pod %q that has no matching volumes on node %q ...", len(claimsToProvision), podName, node.Name)
836836

837837
return true, provisionedClaims, nil
838838
}

0 commit comments

Comments
 (0)