mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-26 21:17:23 +00:00
Invalidate CheckVolumeBinding predicate only when VolumeScheduling
feature is enabled.
This commit is contained in:
parent
e09be82ad0
commit
d2fc875489
@ -408,7 +408,9 @@ func (c *configFactory) invalidatePredicatesForPvUpdate(oldPV, newPV *v1.Persist
|
|||||||
// which will cache PVs in PodBindingCache. When PV got updated, we should
|
// which will cache PVs in PodBindingCache. When PV got updated, we should
|
||||||
// invalidate cache, otherwise PVAssumeCache.Assume will fail with out of sync
|
// invalidate cache, otherwise PVAssumeCache.Assume will fail with out of sync
|
||||||
// error.
|
// error.
|
||||||
|
if utilfeature.DefaultFeatureGate.Enabled(features.VolumeScheduling) {
|
||||||
invalidPredicates.Insert(predicates.CheckVolumeBindingPred)
|
invalidPredicates.Insert(predicates.CheckVolumeBindingPred)
|
||||||
|
}
|
||||||
for k, v := range newPV.Labels {
|
for k, v := range newPV.Labels {
|
||||||
// If PV update modifies the zone/region labels.
|
// If PV update modifies the zone/region labels.
|
||||||
if isZoneRegionLabel(k) && !reflect.DeepEqual(v, oldPV.Labels[k]) {
|
if isZoneRegionLabel(k) && !reflect.DeepEqual(v, oldPV.Labels[k]) {
|
||||||
|
Loading…
Reference in New Issue
Block a user