Repository navigation
Make least-privilege the chart's default RBAC mode - #554
Merged
Merged
Conversation
The chart now defaults to rbac.mode=least-privilege, so a default install no longer gets list/watch on every resource kind. rbac.mode=full stays available for custom resources and kinds added later. Also fix the values.yaml comment: the license instance Secret grant is get/update, not get/create/update.
TestHelmFullRBACIsReadOnly rendered the chart defaults, which are now least-privilege; it now sets rbac.mode=full, and a new test checks that the default is least-privilege. TestThreadSaverFlushTimeoutDoesNotWriteAfterClose could hang: with a 1ms flush timeout, Save saw the expired context before calling the snapshot, so the test waited forever for it. A first save now holds the lock inside the snapshot, so the Flush always times out whatever the scheduling.
abahmed
force-pushed
the
rbac-least-privilege-default
branch
from
October 18, 2026 10:32
289e4cd to
3d9d574
Compare
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.
What
deploy/chart/values.yaml:rbac.modenow defaults toleast-privilege(the schema default and the template fallback match).--set rbac.mode=fullopts back into list/watch on every resource.get/updateonkwatch-license-instance, notget/create/update. The Role has nocreate. This was meant to be its own small fix; it's in this PR because it touches the same file.README.md,docs/upgrading-to-1.0.md,docs/configuration.md,docs/production-operations.mdanddocs/contributing-source.mddescribe the new default and how to opt back intofull.deploy/chart/test_helm.shnow checks that the default has no wildcard and thatfullstill renders one.Please review before merging
rbac.mode=full.least-privilegestill lists Secrets; onlywatch.secrets=falseremoves that access.deploy/deploy.yamlstaysfull(the manifest parity check requires it). If the installer applies its own ClusterRole, it is unchanged too. Raw/installer installs and chart installs now get different access.Checks
helm lint,test_helm.sh, manifest parity, release consistency, docs-verify, line-check, diff-check, hygiene and test-layout all passed locally.make verifycould not finish locally: the disk ran out. No Go code changed. CI must run the full gate and e2e (thee2elabel is set).