Merge pull request #72664 from sbezverk/ResourceQuotaScopeSelectors

Move ResourceQuotaSelector out of validation
This commit is contained in:
Kubernetes Prow Robot
2019-01-08 02:02:59 -08:00
committed by GitHub
8 changed files with 203 additions and 9 deletions

View File

@@ -4901,9 +4901,6 @@ func validateScopeSelector(resourceQuotaSpec *core.ResourceQuotaSpec, fld *field
if resourceQuotaSpec.ScopeSelector == nil {
return allErrs
}
if !utilfeature.DefaultFeatureGate.Enabled(features.ResourceQuotaScopeSelectors) && resourceQuotaSpec.ScopeSelector != nil {
allErrs = append(allErrs, field.Forbidden(fld.Child("scopeSelector"), "ResourceQuotaScopeSelectors feature-gate is disabled"))
}
allErrs = append(allErrs, validateScopedResourceSelectorRequirement(resourceQuotaSpec, fld.Child("scopeSelector"))...)
return allErrs
}