Skip to content

Commit dc4d0c8

Browse files
authored
chore: Describe RBAC rules, remove unnecessary rules (#412)
* chore: Describe RBAC rules, remove unnecessary rules * chore: Update changelog * Apply suggestions from code review Co-authored-by: Nick <10092581+NickLarsenNZ@users.noreply.github.com> * chore: Remove the get for customresourcedefinitions for the operator clusterrole Not required for CRD maintenance * chore: Simplify rule comments * chore(nix): Update crate hashes * chore: Clarify comment * chore: Move rule comment inside gate
1 parent f57d656 commit dc4d0c8

4 files changed

Lines changed: 37 additions & 28 deletions

File tree

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file.
44

55
## [Unreleased]
66

7+
### Changed
8+
9+
- Document Helm deployed RBAC permissions and remove unnecessary permissions ([#412]).
10+
11+
[#412]: https://github.com/stackabletech/commons-operator/pull/412
12+
713
## [26.3.0] - 2026-03-16
814

915
## [26.3.0-rc1] - 2026-03-16

Cargo.nix

Lines changed: 9 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crate-hashes.json

Lines changed: 9 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

deploy/helm/commons-operator/templates/roles.yaml

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,62 +6,65 @@ metadata:
66
labels:
77
{{- include "operator.labels" . | nindent 4 }}
88
rules:
9+
# Watch pods to detect expired restart annotations.
10+
# Watch configmaps and secrets to trigger rolling restarts of referencing StatefulSets.
911
- apiGroups:
1012
- ""
1113
resources:
1214
- pods
1315
- configmaps
1416
- secrets
15-
- nodes
1617
verbs:
17-
- get
1818
- list
1919
- watch
20-
# For automatic cluster domain detection
20+
# For automatic cluster domain detection.
2121
- apiGroups:
2222
- ""
2323
resources:
2424
- nodes/proxy
2525
verbs:
2626
- get
27+
# Watch and patch StatefulSets (labelled restarter.stackable.tech/enabled=true)
28+
# to trigger rolling restarts when referenced ConfigMaps or Secrets change.
2729
- apiGroups:
2830
- apps
2931
resources:
3032
- statefulsets
3133
verbs:
32-
- get
3334
- list
3435
- watch
35-
- patch # We need to add a label to the StatefulSet
36+
- patch
37+
# Emit Kubernetes events from the restart controllers.
3638
- apiGroups:
3739
- events.k8s.io
3840
resources:
3941
- events
4042
verbs:
4143
- create
4244
- patch
45+
# Evict pods whose restarter.stackable.tech/expires-at.* annotation timestamp
46+
# has been reached.
4347
- apiGroups:
4448
- ""
4549
resources:
4650
- pods/eviction
4751
verbs:
4852
- create
49-
# Required to maintain MutatingWebhookConfigurations. The operator needs to do this, as it needs
50-
# to enter e.g. it's generated certificate in the webhooks.
53+
# Required to maintain MutatingWebhookConfigurations with auto-generated and
54+
# rotated webhook certificates.
5155
- apiGroups: [admissionregistration.k8s.io]
5256
resources: [mutatingwebhookconfigurations]
5357
verbs:
5458
- create
5559
- patch
56-
# Required to maintain the CRD. The operator needs to do this, as it needs to enter e.g. it's
57-
# generated certificate in the conversion webhook.
5860
{{ if .Values.maintenance.customResourceDefinitions.maintain }}
61+
# Required to maintain the CRD with auto-generated and rotated webhook
62+
# certificates.
5963
- apiGroups:
6064
- apiextensions.k8s.io
6165
resources:
6266
- customresourcedefinitions
6367
verbs:
64-
- get
6568
- create
6669
- patch
6770
{{ end }}

0 commit comments

Comments
 (0)