move local PV to GA

This commit is contained in:
Michelle Au
2019-02-28 18:54:35 -08:00
parent 9fd7a4c2dc
commit 5f0847b515
3 changed files with 3 additions and 111 deletions

View File

@@ -28,9 +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.PersistentLocalVolumes) && !persistentLocalVolumesInUse(oldPVSpec) {
pvSpec.PersistentVolumeSource.Local = 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 {
@@ -48,13 +45,3 @@ func volumeModeInUse(oldPVSpec *api.PersistentVolumeSpec) bool {
}
return false
}
func persistentLocalVolumesInUse(oldPVSpec *api.PersistentVolumeSpec) bool {
if oldPVSpec == nil {
return false
}
if oldPVSpec.PersistentVolumeSource.Local != nil {
return true
}
return false
}