Merge pull request #51257 from NickrenREN/validation-bugfix
Automatic merge from submit-queue (batch tested with PRs 51038, 50063, 51257, 47171, 51143) Fix validation return value Errors returned by some validation functions may be wrong **Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #51256 **Release note**: ```release-note NONE ```
This commit is contained in:
@@ -3443,7 +3443,7 @@ func validateResourceName(value string, fldPath *field.Path) field.ErrorList {
|
||||
}
|
||||
}
|
||||
|
||||
return field.ErrorList{}
|
||||
return allErrs
|
||||
}
|
||||
|
||||
// Validate container resource name
|
||||
@@ -3456,7 +3456,7 @@ func validateContainerResourceName(value string, fldPath *field.Path) field.Erro
|
||||
return append(allErrs, field.Invalid(fldPath, value, "must be a standard resource for containers"))
|
||||
}
|
||||
}
|
||||
return field.ErrorList{}
|
||||
return allErrs
|
||||
}
|
||||
|
||||
// Validate resource names that can go in a resource quota
|
||||
@@ -3468,7 +3468,7 @@ func ValidateResourceQuotaResourceName(value string, fldPath *field.Path) field.
|
||||
return append(allErrs, field.Invalid(fldPath, value, isInvalidQuotaResource))
|
||||
}
|
||||
}
|
||||
return field.ErrorList{}
|
||||
return allErrs
|
||||
}
|
||||
|
||||
// Validate limit range types
|
||||
|
Reference in New Issue
Block a user