Skip to content

charts/redpanda, multicluster: deduplicate RBAC - #1922

Merged
chrisseto merged 2 commits into
mainfrom
chris/dedup-rbac
Oct 12, 2026
Merged

chrisseto merged 2 commits into
mainfrom
chris/dedup-rbac

Conversation

@chrisseto

@chrisseto chrisseto commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

charts/redpanda: extract RBAC rendering into a shared RoleSet (104dc30)

Before this change, rules were in YAML files embedded by the chart. gotohelm's
shared packages do not support go:embed. RoleSet moves the rules to Go, so
the chart and the operator may one source.

The controller-gen output is now a test fixture. A test makes sure that
the Go rules and the fixtures are equal.

RoleSet adds the metrics-reader and stretch-rack-awareness
ClusterRoles for the operator. The chart does not enable them. The chart
output does not change.

operator/multicluster: render RBAC through the shared RoleSet (8b60212)

Replace the operator RBAC functions with rbacForPool.

Remove these grants. No code uses them:

  • sidecar Role: pods, apps/statefulsets.
  • rack-awareness ClusterRole: list and watch on nodes.
    • This removes stretch-rack-awareness from the operator too.

Additional:

  • Do not truncate ClusterRole names to 63 characters. Truncation can
    give all ClusterRoles the same name.
  • Copy labels and annotations for each object.

@chrisseto
chrisseto added this pull request to stack #1882 September 25, 2026 19:34
@secpanda

secpanda commented Sep 25, 2026 •

Copy link
Copy Markdown

✅ Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
✅ Open Source Security 0 0 0 0 0 issues
✅ Licenses 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@chrisseto chrisseto changed the title Chris/dedup rbac charts/redpanda, multicluster: deduplicate RBAC Sep 25, 2026
Base automatically changed from chris/dedup-tls to main October 6, 2026 19:55
@chrisseto
chrisseto marked this pull request as ready for review October 9, 2026 17:26
Before this change, rules were in YAML files embedded by the chart. gotohelm's
shared packages do not support `go:embed`. `RoleSet` moves the rules to Go, so
the chart and the operator may one source.

The controller-gen output is now a test fixture. A test makes sure that
the Go rules and the fixtures are equal.

`RoleSet` adds the `metrics-reader` and `stretch-rack-awareness`
ClusterRoles for the operator. The chart does not enable them. The chart
output does not change.
Replace the operator RBAC functions with `rbacForPool`.

Remove these grants. No code uses them:
- sidecar `Role`: `pods`, `apps/statefulsets`.
- rack-awareness `ClusterRole`: `list` and `watch` on `nodes`.
  - This removes `stretch-rack-awareness` from the operator too.

Additional:
- Do not truncate `ClusterRole` names to 63 characters. Truncation can
  give all `ClusterRole`s the same name.
- Copy labels and annotations for each object.
@chrisseto
chrisseto merged commit b38d5cd into main Oct 12, 2026
14 checks passed
@chrisseto
chrisseto deleted the chris/dedup-rbac branch October 12, 2026 18:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants