Commit c4a02542 authored by Jordan Liggitt's avatar Jordan Liggitt

remove subpath feature validation failure

parent de96583d
......@@ -2299,11 +2299,7 @@ func ValidateVolumeMounts(mounts []core.VolumeMount, voldevices map[string]strin
}
if len(mnt.SubPath) > 0 {
if !utilfeature.DefaultFeatureGate.Enabled(features.VolumeSubpath) {
allErrs = append(allErrs, field.Forbidden(fldPath.Child("subPath"), "subPath is disabled by feature-gate"))
} else {
allErrs = append(allErrs, validateLocalDescendingPath(mnt.SubPath, fldPath.Child("subPath"))...)
}
allErrs = append(allErrs, validateLocalDescendingPath(mnt.SubPath, fldPath.Child("subPath"))...)
}
if mnt.MountPropagation != nil {
......
......@@ -4931,7 +4931,7 @@ func TestValidateDisabledSubpath(t *testing.T) {
SubPath: "baz",
},
},
true,
false, // validation should not fail, dropping the field is handled in PrepareForCreate/PrepareForUpdate
},
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment