apimachinery: do not fuzz ObjectMeta.{Labels/Annotation} with empty keys

This commit is contained in:
Dr. Stefan Schimanski 2018-06-04 14:55:37 +00:00
parent 1635393bd1
commit 808bd3703a

View File

@ -200,9 +200,13 @@ func v1FuzzerFuncs(codecs runtimeserializer.CodecFactory) []interface{} {
if len(j.Labels) == 0 {
j.Labels = nil
} else {
delete(j.Labels, "")
}
if len(j.Annotations) == 0 {
j.Annotations = nil
} else {
delete(j.Annotations, "")
}
if len(j.OwnerReferences) == 0 {
j.OwnerReferences = nil