mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-20 18:31:15 +00:00
revert check in filter
This commit is contained in:
parent
de7c8db7cb
commit
0abdf6abc2
@ -189,6 +189,11 @@ func (pl *VolumeZone) PreFilterExtensions() framework.PreFilterExtensions {
|
|||||||
// require calling out to the cloud provider. It seems that we are moving away
|
// require calling out to the cloud provider. It seems that we are moving away
|
||||||
// from inline volume declarations anyway.
|
// from inline volume declarations anyway.
|
||||||
func (pl *VolumeZone) Filter(ctx context.Context, cs *framework.CycleState, pod *v1.Pod, nodeInfo *framework.NodeInfo) *framework.Status {
|
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
|
var podPVTopologies []pvTopology
|
||||||
state, err := getStateData(cs)
|
state, err := getStateData(cs)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user