Merge pull request #16710 from feihujiang/addCommentNamespaceClearedForRootscopedResources

Auto commit by PR queue bot
pull/6/head
k8s-merge-robot 2015-11-02 22:57:30 -08:00
commit 5681bacef4
1 changed files with 1 additions and 0 deletions

View File

@ -245,6 +245,7 @@ func ValidateImmutableField(old, new interface{}, fieldName string) errs.Validat
// ValidateObjectMeta validates an object's metadata on creation. It expects that name generation has already
// been performed.
// It doesn't return an error for rootscoped resources with namespace, because namespace should already be cleared before.
// TODO: Remove calls to this method scattered in validations of specific resources, e.g., ValidatePodUpdate.
func ValidateObjectMeta(meta *api.ObjectMeta, requiresNamespace bool, nameFn ValidateNameFunc) errs.ValidationErrorList {
allErrs := errs.ValidationErrorList{}