-
Notifications
You must be signed in to change notification settings - Fork 192
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
feat: implement cmpd's PolicyRules #8328
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #8328 +/- ##
==========================================
+ Coverage 60.34% 60.65% +0.30%
==========================================
Files 381 382 +1
Lines 46215 46502 +287
==========================================
+ Hits 27889 28204 +315
+ Misses 15654 15619 -35
- Partials 2672 2679 +7
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
pkg/controller/factory/builder.go
Outdated
return nil | ||
} | ||
return builder.NewRoleBuilder(synthesizedComp.Namespace, saName). | ||
AddLabelsInMap(constant.GetCompLabels(synthesizedComp.ClusterName, synthesizedComp.Name)). |
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.
And these labels become meaningless because they do not belong to any specific object.
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.
Actually they do belong to one component. When this component is being deleted:
- if there's no other component use the cmpd it uses, these rbac resources will be deleted.
- if there is, these rbac resources' ownership will be transfered to another component.
31d6fc0
to
3851918
Compare
/cherry-pick release-1.0-beta |
🤖 says: cherry pick action finished successfully 🎉! |
(cherry picked from commit cf9d59b)
Fixes #8310. Things done in this PR:
serviceAccountName
in cluster and component CR. KB now does not create rbac resources if user has specified a service account.kb-<clusterName>-<compName>
.Addon changes (like update pg addon's cmpd policyRule since we removed kubeblocks-patroni-pod-role) will be addressed in apecloud/kubeblocks-addons#1197.