mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-22 11:21:47 +00:00
apimachinery: do not fuzz ObjectMeta.{Labels/Annotation} with empty keys
This commit is contained in:
parent
1635393bd1
commit
808bd3703a
@ -200,9 +200,13 @@ func v1FuzzerFuncs(codecs runtimeserializer.CodecFactory) []interface{} {
|
|||||||
|
|
||||||
if len(j.Labels) == 0 {
|
if len(j.Labels) == 0 {
|
||||||
j.Labels = nil
|
j.Labels = nil
|
||||||
|
} else {
|
||||||
|
delete(j.Labels, "")
|
||||||
}
|
}
|
||||||
if len(j.Annotations) == 0 {
|
if len(j.Annotations) == 0 {
|
||||||
j.Annotations = nil
|
j.Annotations = nil
|
||||||
|
} else {
|
||||||
|
delete(j.Annotations, "")
|
||||||
}
|
}
|
||||||
if len(j.OwnerReferences) == 0 {
|
if len(j.OwnerReferences) == 0 {
|
||||||
j.OwnerReferences = nil
|
j.OwnerReferences = nil
|
||||||
|
Loading…
Reference in New Issue
Block a user