-
Notifications
You must be signed in to change notification settings - Fork 373
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
Add clientset for ClusterGroupMembers and GroupAssociation #2130
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.
This looks good on my side.
Yes we should probably rename it to ClusterGroupMembership
in the future to match GroupAssociation
Codecov Report
@@ Coverage Diff @@
## main #2130 +/- ##
==========================================
+ Coverage 61.26% 65.28% +4.02%
==========================================
Files 269 269
Lines 20424 20791 +367
==========================================
+ Hits 12512 13574 +1062
+ Misses 6624 5831 -793
- Partials 1288 1386 +98
Flags with carried forward coverage won't be shown. Click here to find out more.
|
// ClusterGroupMembersesGetter has a method to return a ClusterGroupMembersInterface. | ||
// A group's client should implement this interface. | ||
type ClusterGroupMembersesGetter interface { | ||
ClusterGroupMemberses() ClusterGroupMembersInterface |
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.
You can specify "--plural-exceptions" when calling client-gen to avoid it
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.
Thanks for coming to the rescue, as always :) Updated
7d8bcd8
to
4f59a5a
Compare
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, thanks.
/test-all |
/test-networkpolicy |
Enhance programmatic access to the ClusterGroupMembers and GroupAssociation resources.
Both can now be accessed via the Antrea clientset
Note that the interface for ClusterGroupMembers is awkwardly named: this is because in controlplane/v1beta2/types.go the resource itself is defined in its plural form, which is out of the convention for client generation. In future controlplane API group upgrade, we should consider updating the
ClusterGroupMembers
type toClusterGroupMember
.