Remove mount propagation feature gate logic

This commit is contained in:
Fabio Bertinatto
2018-10-25 12:26:18 +02:00
parent 76234a31b0
commit 6c9b854542
9 changed files with 2 additions and 79 deletions

View File

@@ -248,13 +248,6 @@ func DropDisabledAlphaFields(podSpec *api.PodSpec) {
}
}
for i := range podSpec.Containers {
DropDisabledVolumeMountsAlphaFields(podSpec.Containers[i].VolumeMounts)
}
for i := range podSpec.InitContainers {
DropDisabledVolumeMountsAlphaFields(podSpec.InitContainers[i].VolumeMounts)
}
DropDisabledVolumeDevicesAlphaFields(podSpec)
DropDisabledRunAsGroupField(podSpec)
@@ -304,16 +297,6 @@ func DropDisabledProcMountField(podSpec *api.PodSpec) {
}
}
// DropDisabledVolumeMountsAlphaFields removes disabled fields from []VolumeMount.
// This should be called from PrepareForCreate/PrepareForUpdate for all resources containing a VolumeMount
func DropDisabledVolumeMountsAlphaFields(volumeMounts []api.VolumeMount) {
if !utilfeature.DefaultFeatureGate.Enabled(features.MountPropagation) {
for i := range volumeMounts {
volumeMounts[i].MountPropagation = nil
}
}
}
// DropDisabledVolumeDevicesAlphaFields removes disabled fields from []VolumeDevice.
// This should be called from PrepareForCreate/PrepareForUpdate for all resources containing a VolumeDevice
func DropDisabledVolumeDevicesAlphaFields(podSpec *api.PodSpec) {