Merge pull request #72686 from sbezverk/PersistentLocalVolumes

Moving PersistentLocalVolumes feature gate check from validation
This commit is contained in:
Kubernetes Prow Robot
2019-01-08 19:22:40 -08:00
committed by GitHub
4 changed files with 110 additions and 30 deletions

View File

@@ -1714,9 +1714,6 @@ func ValidatePersistentVolume(pv *core.PersistentVolume) field.ErrorList {
allErrs = append(allErrs, field.Forbidden(specPath.Child("local"), "may not specify more than 1 volume type"))
} else {
numVolumes++
if !utilfeature.DefaultFeatureGate.Enabled(features.PersistentLocalVolumes) {
allErrs = append(allErrs, field.Forbidden(specPath.Child("local"), "Local volumes are disabled by feature-gate"))
}
allErrs = append(allErrs, validateLocalVolumeSource(pv.Spec.Local, specPath.Child("local"))...)
// NodeAffinity is required