volumeattributesclass and core api changes

This commit is contained in:
carlory
2023-10-31 10:12:02 +08:00
parent f5a5d83d7c
commit ae90a69677
28 changed files with 2171 additions and 84 deletions

View File

@@ -39,6 +39,11 @@ func DropDisabledSpecFields(pvSpec *api.PersistentVolumeSpec, oldPVSpec *api.Per
pvSpec.CSI.NodeExpandSecretRef = nil
}
}
if !utilfeature.DefaultFeatureGate.Enabled(features.VolumeAttributesClass) {
if oldPVSpec == nil || oldPVSpec.VolumeAttributesClassName == nil {
pvSpec.VolumeAttributesClassName = nil
}
}
}
// DropDisabledStatusFields removes disabled fields from the pv status.