diff --git a/pkg/crd/markers/crd.go b/pkg/crd/markers/crd.go index 0c637c773..fafa3d8a3 100644 --- a/pkg/crd/markers/crd.go +++ b/pkg/crd/markers/crd.go @@ -369,6 +369,9 @@ func (s Metadata) ApplyToCRD(crd *apiext.CustomResourceDefinition, version strin } for _, str := range s.Annotations { kv := strings.SplitN(str, "=", 2) + if len(kv) < 2 { + return fmt.Errorf("annotation %s is not in 'xxx=xxx' format", str) + } crd.Annotations[kv[0]] = kv[1] } }