Commit cd908f3e authored by Kubernetes Submit Queue's avatar Kubernetes Submit Queue Committed by GitHub

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 ```
parents 16a438b5 a975ee13
......@@ -207,6 +207,8 @@ var standardResources = sets.NewString(
string(api.ResourcePersistentVolumeClaims),
string(api.ResourceStorage),
string(api.ResourceRequestsStorage),
string(api.ResourceServicesNodePorts),
string(api.ResourceServicesLoadBalancers),
)
// IsStandardResourceName returns true if the resource is known to the system
......
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment