ACM-22604 Initial clusterRoleBindings feature - #62
Conversation
Signed-off-by: fxiang1 <fxiang@redhat.com>
Signed-off-by: fxiang1 <fxiang@redhat.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #62 +/- ##
==========================================
+ Coverage 68.24% 69.61% +1.37%
==========================================
Files 2 2
Lines 381 418 +37
==========================================
+ Hits 260 291 +31
- Misses 107 111 +4
- Partials 14 16 +2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
/uncc @xiangjingli |
|
@mikeshng Please review when you have some cycles. Thanks! |
Thanks. Will do! It still have the do not merge hold tag that's why I didn't start reviewing it yet. Removing it. /unhold |
| Subjects: subjects, | ||
| // We make the behaviour consistent with how subject and subjects are handled in ClusterRoleBinding | ||
| // subjects will just override subject if both are provided | ||
| if clusterPermission.Spec.ClusterRoleBindings == nil || len(*clusterPermission.Spec.ClusterRoleBindings) == 0 { |
There was a problem hiding this comment.
This if block is confusing and I think unnecessary. To deal with the spec crbs and backward compatible spec crb, we should add the handling spec crbs logic first. Like:
If crbs exists then do crbs stuffs, so now the return var "clusterRoleBindings" should not be empty anymore.
Only if return var "clusterRoleBindings" is empty and spec crb exist then do crb stuffs
There was a problem hiding this comment.
Ok how about the latest change? I tried a different AI prompt.
Signed-off-by: fxiang1 <fxiang@redhat.com>
mikeshng
left a comment
There was a problem hiding this comment.
/approve
/lgtm
I still prefer having the plural block to come first but it's not a big deal.
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: fxiang1, mikeshng The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
c8c8afe
into
open-cluster-management-io:main
https://issues.redhat.com/browse/ACM-22604