Move pod ReadinessGates feature gate out of validation

This commit is contained in:
Rajath Agasthya
2019-01-08 12:21:49 -08:00
parent 555c63fff5
commit 86165ac878
4 changed files with 110 additions and 5 deletions

View File

@@ -2669,9 +2669,6 @@ const (
func validateReadinessGates(readinessGates []core.PodReadinessGate, fldPath *field.Path) field.ErrorList {
allErrs := field.ErrorList{}
if !utilfeature.DefaultFeatureGate.Enabled(features.PodReadinessGates) && len(readinessGates) > 0 {
return append(allErrs, field.Forbidden(fldPath, "PodReadinessGates is disabled by feature gate"))
}
for i, value := range readinessGates {
for _, msg := range validation.IsQualifiedName(string(value.ConditionType)) {
allErrs = append(allErrs, field.Invalid(fldPath.Index(i).Child("conditionType"), string(value.ConditionType), msg))