-
Notifications
You must be signed in to change notification settings - Fork 190
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
Export GroupVersionResource
and GroupKind
variables
#212
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
/lgtm
/lgtm cancel |
@@ -32,7 +33,7 @@ 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 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we still need this method?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, because the runtime doesn't import the resource package itself (it loads the resource manager factory from a registry) but still needs to know the GroupKind:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
@@ -32,7 +33,7 @@ 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 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, because the runtime doesn't import the resource package itself (it loads the resource manager factory from a registry) but still needs to know the GroupKind:
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: jaypipes, RedbackThomson, vijtrip2 The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Fixes aws-controllers-k8s/community#998
Description of changes:
GroupVersionResource
is used by dynamic clients to specify the CRD to be CRUD'd.GroupKind
is sometimes used in place where the version is not necessarily specified. I chose to export this mainly because it could be used down the line by other dynamic clients.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.