diff --git a/constraint/pkg/client/crd_helpers.go b/constraint/pkg/client/crd_helpers.go index 6c2f32b5d..909a269ad 100644 --- a/constraint/pkg/client/crd_helpers.go +++ b/constraint/pkg/client/crd_helpers.go @@ -83,8 +83,9 @@ func (h *crdHelper) createCRD( Names: apiextensions.CustomResourceDefinitionNames{ Kind: templ.Spec.CRD.Spec.Names.Kind, ListKind: templ.Spec.CRD.Spec.Names.Kind + "List", - Plural: strings.ToLower(templ.Spec.CRD.Spec.Names.Kind), + Plural: strings.ToLower(templ.Spec.CRD.Spec.Names.Kind), Singular: strings.ToLower(templ.Spec.CRD.Spec.Names.Kind), + ShortNames: templ.Spec.CRD.Spec.Names.ShortNames, Categories: []string{ "all", "constraint", diff --git a/constraint/pkg/client/crd_helpers_test.go b/constraint/pkg/client/crd_helpers_test.go index 665380041..d83497d16 100644 --- a/constraint/pkg/client/crd_helpers_test.go +++ b/constraint/pkg/client/crd_helpers_test.go @@ -25,7 +25,7 @@ func name(name string) tmplArg { func crdNames(kind string) tmplArg { return func(tmpl *templates.ConstraintTemplate) { tmpl.Spec.CRD.Spec.Names = templates.Names{ - Kind: kind, + Kind: kind, } } }