Skip to content

Commit 8ef336c

Browse files
authored
Merge pull request kubernetes#74568 from hex108/pv
Remove redundant checker whether pod has claims in func FindPodVolumes
2 parents 51b5d28 + a916f1b commit 8ef336c

File tree

1 file changed

+0
-14
lines changed

1 file changed

+0
-14
lines changed

pkg/controller/volume/persistentvolume/scheduler_binder.go

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -139,15 +139,6 @@ func (b *volumeBinder) GetBindingsCache() PodBindingCache {
139139
return b.podBindingCache
140140
}
141141

142-
func podHasClaims(pod *v1.Pod) bool {
143-
for _, vol := range pod.Spec.Volumes {
144-
if vol.PersistentVolumeClaim != nil {
145-
return true
146-
}
147-
}
148-
return false
149-
}
150-
151142
// FindPodVolumes caches the matching PVs and PVCs to provision per node in podBindingCache.
152143
// This method intentionally takes in a *v1.Node object instead of using volumebinder.nodeInformer.
153144
// That's necessary because some operations will need to pass in to the predicate fake node objects.
@@ -168,11 +159,6 @@ func (b *volumeBinder) FindPodVolumes(pod *v1.Pod, node *v1.Node) (unboundVolume
168159
}
169160
}()
170161

171-
if !podHasClaims(pod) {
172-
// Fast path
173-
return unboundVolumesSatisfied, boundVolumesSatisfied, nil
174-
}
175-
176162
var (
177163
matchedClaims []*bindingInfo
178164
provisionedClaims []*v1.PersistentVolumeClaim

0 commit comments

Comments
 (0)