Repository navigation
Conversation
cwrau
force-pushed
the
feat/rbac/aggregate-view
branch
from
October 7, 2026 10:31
0e88bdd to
db4e409
Compare
… roles Signed-off-by: Chris Werner Rau <cwrau@cwrau.info>
cwrau
force-pushed
the
feat/rbac/aggregate-view
branch
from
October 15, 2026 14:49
db4e409 to
5fb3673
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Thanks for taking the time to contribute to
clickhouse-operator!Please, read carefully instructions on how to make a Pull Request.
This will help a lot for maintainers to adopt your Pull Request.
Important items to consider before making a Pull Request
Please check items PR complies to:
next-releasebranch, not intomasterbranch1. More info--
1 If you feel your PR does not affect any Go-code or any testable functionality (for example, PR contains docs only or supplementary materials), PR can be made into
masterbranch, but it has to be confirmed by project's maintainer.Description
Users who are bound to the builtin
view,editoradminClusterRoles cannot see or manage the operator's custom resources, so they need hand-written RBAC for them. Kubernetes lets aggregated ClusterRoles extend the builtin ones throughrbac.authorization.k8s.io/aggregate-to-{view,edit,admin}labels. This PR adds such roles to the Helm chart (templates/aggregated-clusterroles.yaml).Three ClusterRoles are created, named
<fullname>-aggregate-view,-aggregate-editand-aggregate-view-sensitive:ClickHouseInstallationClickHouseInstallationTemplateClickHouseOperatorConfigurationClickHouseKeeperInstallationeditandadminroles do not inheritview, so the read role carries all three labels.ClickHouseInstallationis not readable byview. The operator writes the normalized CR intostatus.normalized/status.normalizedCompleted, including thepassword_sha256_hexhashes it derives for users, and a CHI can also carry inline users, passwords and config in its spec. Reads therefore sit in a separate-aggregate-view-sensitiverole labelled foreditandadminonly.editandadmincan read all Secrets in a namespace anyway.rbac.aggregate.enabled=false. They also requirerbac.create.create,delete,deletecollection,patch,update.Also changed:
values.yaml,values.schema.json, chartREADME.md(helm-docs),docs/operator_installation_details.md,CHANGELOG.md(entry under 0.28.0, "Added"), anddev/test_helm_chart.sh(rendering assertions for labels, verbs, covered kinds and the two switches).The chart version is not bumped in this PR; I assume the release process does that.
Testing
dev/test_helm_chart.sh: 43 checks pass, including the README drift check (helm-docs).helm lintpasses.aggregate-to-viewadded to the sensitive role in a scratch copy of the chart, 3 of the new checks fail (CHI readable by view, wrong labels on the sensitive role), so the assertions catch a regression.