revert check in filter

This commit is contained in:
kidddddddddddddddddddddd 2023-01-07 22:30:16 +08:00
parent de7c8db7cb
commit 0abdf6abc2

View File

@ -189,6 +189,11 @@ func (pl *VolumeZone) PreFilterExtensions() framework.PreFilterExtensions {
// require calling out to the cloud provider. It seems that we are moving away
// from inline volume declarations anyway.
func (pl *VolumeZone) Filter(ctx context.Context, cs *framework.CycleState, pod *v1.Pod, nodeInfo *framework.NodeInfo) *framework.Status {
// If a pod doesn't have any volume attached to it, the predicate will always be true.
// Thus we make a fast path for it, to avoid unnecessary computations in this case.
if len(pod.Spec.Volumes) == 0 {
return nil
}
var podPVTopologies []pvTopology
state, err := getStateData(cs)
if err != nil {