Remove VolumeSubpathEnvExpansion Feature Gate

This commit is contained in:
Kevin Taylor
2020-03-27 16:28:33 +00:00
parent f8e62e33c9
commit 9fd48b4039
5 changed files with 3 additions and 21 deletions

View File

@@ -394,8 +394,8 @@ func dropDisabledFields(
podSpec.EphemeralContainers = nil
}
if (!utilfeature.DefaultFeatureGate.Enabled(features.VolumeSubpath) || !utilfeature.DefaultFeatureGate.Enabled(features.VolumeSubpathEnvExpansion)) && !subpathExprInUse(oldPodSpec) {
// drop subpath env expansion from the pod if either of the subpath features is disabled and the old spec did not specify subpath env expansion
if !utilfeature.DefaultFeatureGate.Enabled(features.VolumeSubpath) && !subpathExprInUse(oldPodSpec) {
// drop subpath env expansion from the pod if subpath feature is disabled and the old spec did not specify subpath env expansion
VisitContainers(podSpec, AllContainers, func(c *api.Container, containerType ContainerType) bool {
for i := range c.VolumeMounts {
c.VolumeMounts[i].SubPathExpr = ""