remove subpath feature validation failure

pull/564/head
Jordan Liggitt 2018-12-18 10:11:29 -05:00
parent de96583d8c
commit c4a0254201
2 changed files with 2 additions and 6 deletions

View File

@ -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 {

View File

@ -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
},
}