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: disable manual rbac by default #1197

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft

Conversation

cjc7373
Copy link
Contributor

@cjc7373 cjc7373 commented Nov 14, 2024

also add patroni's policy rules

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
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.

3 participants