diff --git a/templates/pkg/resource/descriptor.go.tpl b/templates/pkg/resource/descriptor.go.tpl index 5733a5c4..4b8b2953 100644 --- a/templates/pkg/resource/descriptor.go.tpl +++ b/templates/pkg/resource/descriptor.go.tpl @@ -3,6 +3,7 @@ package {{ .CRD.Names.Snake }} import ( + "k8s.io/apimachinery/pkg/runtime/schema" ackv1alpha1 "github.com/aws-controllers-k8s/runtime/apis/core/v1alpha1" acktypes "github.com/aws-controllers-k8s/runtime/pkg/types" ackcompare "github.com/aws-controllers-k8s/runtime/pkg/compare" @@ -30,10 +31,10 @@ var ( type resourceDescriptor struct { } -// GroupKind returns a Kubernetes metav1.GroupKind struct that describes the -// API Group and Kind of CRs described by the descriptor -func (d *resourceDescriptor) GroupKind() *metav1.GroupKind { - return &GroupKind +// GroupVersionKind returns a Kubernetes schema.GroupVersionKind struct that +// describes the API Group, Version and Kind of CRs described by the descriptor +func (d *resourceDescriptor) GroupVersionKind() schema.GroupVersionKind { + return svcapitypes.GroupVersion.WithKind(GroupKind.Kind) } // EmptyRuntimeObject returns an empty object prototype that may be used in