Skip to content
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

chore: remove rbac related definition #1197

Merged
merged 2 commits into from
Jan 22, 2025
Merged

Conversation

cjc7373
Copy link
Contributor

@cjc7373 cjc7373 commented Nov 14, 2024

also add patroni's policy rules

todo: rabbitmq seems to need some rbac policies

zjx20
zjx20 previously approved these changes Nov 14, 2024
Copy link
Contributor

@zjx20 zjx20 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Just curious, in which case should the rbacEnabled be set to true?

@cjc7373
Copy link
Contributor Author

cjc7373 commented Nov 18, 2024

It seems like rbacEnabled is used to "simulate" user defined rbac resources. @Y-Rookie What's this field designed for?

@zjx20
Copy link
Contributor

zjx20 commented Nov 18, 2024

I suggest deleting it if it's useless.

@ldming
Copy link
Collaborator

ldming commented Nov 20, 2024

It seems like rbacEnabled is used to "simulate" user defined rbac resources. @Y-Rookie What's this field designed for?

In earlier versions of KubeBlokcs, it did not support the automatic creation of service accounts (SA) with specific roles for clusters. Therefore, they would be created in kbcli or helm charts. After KB started supporting this feature, in most cases, this parameter has become unnecessary.

But, to my knowledge, currently, Elasticsearch sets this parameter to true, referring to this PR apecloud/kbcli#460.

https://github.com/apecloud/kubeblocks/blob/26e2cf458382b8732d5e2ff54e3ac8b273f02272/controllers/apps/transformer_component_rbac.go#L268-L271
KubeBlocks will not create sa if probe, volume protection, and data protection are disabled at the same time.

IMO, KubeBlocks should create the cluster SA, and delete the rbacEnabled in helm chart and kbcli.

ldming
ldming previously approved these changes Nov 25, 2024
@cjc7373
Copy link
Contributor Author

cjc7373 commented Nov 25, 2024

I'll do the cleanup and remove rbacEnabled.

@cjc7373 cjc7373 marked this pull request as draft November 25, 2024 07:31
@cjc7373 cjc7373 dismissed stale reviews from ldming and zjx20 via d8060b7 November 29, 2024 08:04
@cjc7373 cjc7373 force-pushed the chore/disable-manual-rbac branch from d8060b7 to fc22eaf Compare November 29, 2024 10:48
@cjc7373 cjc7373 changed the title chore: disable manual rbac by default chore: remove rbac related definition Nov 29, 2024
@cjc7373 cjc7373 marked this pull request as ready for review November 29, 2024 11:00
@cjc7373 cjc7373 force-pushed the chore/disable-manual-rbac branch from fb81bcb to 8b301d2 Compare January 20, 2025 09:38
@cjc7373 cjc7373 requested a review from a team as a code owner January 20, 2025 09:38
@codecov-commenter
Copy link

codecov-commenter commented Jan 20, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 0.00%. Comparing base (d4eca60) to head (1d5db5e).
Report is 1 commits behind head on main.

Additional details and impacted files
@@          Coverage Diff          @@
##            main   #1197   +/-   ##
=====================================
  Coverage   0.00%   0.00%           
=====================================
  Files         69      69           
  Lines       6900    6900           
=====================================
  Misses      6900    6900           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@cjc7373 cjc7373 force-pushed the chore/disable-manual-rbac branch from 8b301d2 to e9b7c41 Compare January 20, 2025 09:50
zjx20
zjx20 previously approved these changes Jan 21, 2025
@cjc7373
Copy link
Contributor Author

cjc7373 commented Jan 22, 2025

/approve

@cjc7373 cjc7373 merged commit c707fc0 into main Jan 22, 2025
19 checks passed
@cjc7373 cjc7373 deleted the chore/disable-manual-rbac branch January 22, 2025 07:28
@cjc7373
Copy link
Contributor Author

cjc7373 commented Jan 23, 2025

/cherry-pick release-1.0-beta

@apecloud-bot
Copy link
Collaborator

🤖 says: Error cherry-picking.

Auto-merging addons-cluster/mongodb/values.yaml
CONFLICT (content): Merge conflict in addons-cluster/mongodb/values.yaml
Auto-merging addons-cluster/mysql/values.yaml
Auto-merging addons-cluster/rabbitmq/values.yaml
CONFLICT (content): Merge conflict in addons-cluster/rabbitmq/values.yaml
Auto-merging addons-cluster/tidb/templates/cluster.yaml
Auto-merging addons-cluster/tidb/values.yaml
CONFLICT (content): Merge conflict in addons-cluster/tidb/values.yaml
error: could not apply c707fc0... chore: remove rbac related definition (#1197)
hint: After resolving the conflicts, mark them with
hint: "git add/rm ", then run
hint: "git cherry-pick --continue".
hint: You can instead skip this commit with "git cherry-pick --skip".
hint: To abort and get back to the state before "git cherry-pick",
hint: run "git cherry-pick --abort".
hint: Disable this message with "git config advice.mergeConflict false"

@apecloud-bot
Copy link
Collaborator

🤖 says: ‼️ cherry pick action failed.
See: https://github.com/apecloud/kubeblocks-addons/actions/runs/12923369393

@apecloud-bot
Copy link
Collaborator

🤖 says: cherry pick action finished successfully 🎉!
See: https://github.com/apecloud/kubeblocks-addons/actions/runs/12923369393

apecloud-bot pushed a commit that referenced this pull request Jan 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants