-
Notifications
You must be signed in to change notification settings - Fork 366
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
Fix ipBlock referenced in nested ClusterGroup not processed correctly #3383
Conversation
Codecov Report
@@ Coverage Diff @@
## main #3383 +/- ##
==========================================
- Coverage 60.85% 53.64% -7.21%
==========================================
Files 266 239 -27
Lines 26520 34211 +7691
==========================================
+ Hits 16139 18353 +2214
- Misses 8591 14083 +5492
+ Partials 1790 1775 -15
Flags with carried forward coverage won't be shown. Click here to find out more.
|
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, some minor comments
pkg/apiserver/registry/networkpolicy/clustergroupmember/rest.go
Outdated
Show resolved
Hide resolved
/test-all |
/test-all |
@@ -62,12 +62,11 @@ func (r *REST) Get(ctx context.Context, name string, options *metav1.GetOptions) | |||
effectiveIPBlocks = append(effectiveIPBlocks, ipb.CIDR) | |||
} | |||
memberList.EffectiveIPBlocks = effectiveIPBlocks | |||
} else { | |||
effectiveMembers := make([]controlplane.GroupMember, 0, len(groupMembers)) |
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.
Is it still better to keep the code that allocates required size in one shot to be a bit more efficient?
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.
Of course. My bad. Fixed
Signed-off-by: Yang Ding <dingyang@vmware.com>
/test-all |
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
@Dyanngg could you backport this PR to previous releases if applicable? |
…ntrea-io#3383) Signed-off-by: Yang Ding <dingyang@vmware.com>
…ntrea-io#3383) Signed-off-by: Yang Ding <dingyang@vmware.com>
…ntrea-io#3383) Signed-off-by: Yang Ding <dingyang@vmware.com>
fixes #3376
Signed-off-by: Yang Ding dingyang@vmware.com