Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace GroupKind with GroupVersionKind in ResourceDescriptor #431

Merged
merged 2 commits into from
Mar 22, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions templates/pkg/resource/descriptor.go.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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
Expand Down