lock csi and plugin watcher GA feature gates

This commit is contained in:
Michelle Au
2019-03-01 12:56:50 -08:00
parent a352b74bcc
commit 08330c37ca
4 changed files with 2 additions and 68 deletions

View File

@@ -28,12 +28,6 @@ func DropDisabledFields(pvSpec *api.PersistentVolumeSpec, oldPVSpec *api.Persist
if !utilfeature.DefaultFeatureGate.Enabled(features.BlockVolume) && !volumeModeInUse(oldPVSpec) {
pvSpec.VolumeMode = nil
}
if !utilfeature.DefaultFeatureGate.Enabled(features.CSIPersistentVolume) {
// if this is a new PV, or the old PV didn't already have the CSI field, clear it
if oldPVSpec == nil || oldPVSpec.PersistentVolumeSource.CSI == nil {
pvSpec.PersistentVolumeSource.CSI = nil
}
}
}
func volumeModeInUse(oldPVSpec *api.PersistentVolumeSpec) bool {