mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-05 07:27:21 +00:00
Remove mount propagation feature gate logic
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user