From f7bfb04665f0bce517b063a330bf7fe659f65732 Mon Sep 17 00:00:00 2001 From: feihujiang Date: Tue, 3 Nov 2015 11:00:01 +0800 Subject: [PATCH] Add a comment that not return an error for rootscoped resources with namesapce --- pkg/api/validation/validation.go | 1 + 1 file changed, 1 insertion(+) diff --git a/pkg/api/validation/validation.go b/pkg/api/validation/validation.go index 16d1c78852..ac53ae8b3b 100644 --- a/pkg/api/validation/validation.go +++ b/pkg/api/validation/validation.go @@ -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{}