mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 19:56:01 +00:00
Merge pull request #109892 from jlsong01/add_annotation_comments
clarify a comment on annotation key validation
This commit is contained in:
commit
de449881fd
@ -44,6 +44,7 @@ var BannedOwners = map[schema.GroupVersionKind]struct{}{
|
||||
func ValidateAnnotations(annotations map[string]string, fldPath *field.Path) field.ErrorList {
|
||||
allErrs := field.ErrorList{}
|
||||
for k := range annotations {
|
||||
// The rule is QualifiedName except that case doesn't matter, so convert to lowercase before checking.
|
||||
for _, msg := range validation.IsQualifiedName(strings.ToLower(k)) {
|
||||
allErrs = append(allErrs, field.Invalid(fldPath, k, msg))
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user