Skip to content

Commit 43ba3b9

Browse files
committed
chore: Improve comments on rules, add missing comments
1 parent 483f404 commit 43ba3b9

1 file changed

Lines changed: 11 additions & 10 deletions

File tree

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

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,7 @@ rules:
1515
- get
1616
# Manage core workload resources created per HdfsCluster.
1717
# All resources are applied via Server-Side Apply (create + patch) and tracked for
18-
# orphan cleanup (list + delete). Resources watched by the controller also need watch.
19-
# - configmaps: rolegroup config maps; watched via .owns() and .watches()
20-
# - services: rolegroup headless and metrics services; watched via .owns()
18+
# orphan cleanup (list + delete).
2119
- apiGroups:
2220
- ""
2321
resources:
@@ -30,8 +28,7 @@ rules:
3028
- list
3129
- patch
3230
- watch
33-
# serviceaccounts are applied via SSA and tracked for orphan cleanup but not watched
34-
# by the controller.
31+
# serviceaccounts are applied via SSA and tracked for orphan cleanup.
3532
- apiGroups:
3633
- ""
3734
resources:
@@ -42,8 +39,7 @@ rules:
4239
- get
4340
- list
4441
- patch
45-
# rolebindings are applied via SSA and tracked for orphan cleanup but not watched
46-
# by the controller.
42+
# rolebindings are applied via SSA and tracked for orphan cleanup.
4743
- apiGroups:
4844
- rbac.authorization.k8s.io
4945
resources:
@@ -66,8 +62,7 @@ rules:
6662
- list
6763
- patch
6864
- watch
69-
# poddisruptionbudgets are applied via SSA and tracked for orphan cleanup but not watched
70-
# by the controller.
65+
# poddisruptionbudgets are applied via SSA and tracked for orphan cleanup.
7166
- apiGroups:
7267
- policy
7368
resources:
@@ -78,6 +73,8 @@ rules:
7873
- get
7974
- list
8075
- patch
76+
# Required for maintaining the CRDs within the operator (including the conversion webhook info).
77+
# Also for the startup condition check before the controller can run.
8178
- apiGroups:
8279
- apiextensions.k8s.io
8380
resources:
@@ -92,6 +89,7 @@ rules:
9289
# Required for startup condition
9390
- list
9491
- watch
92+
# Required to report reconciliation results and warnings back to the HdfsCluster object.
9593
- apiGroups:
9694
- events.k8s.io
9795
resources:
@@ -117,6 +115,7 @@ rules:
117115
- get
118116
- list
119117
- watch
118+
# Status subresource: updated at the end of every reconciliation.
120119
- apiGroups:
121120
- {{ include "operator.name" . }}.stackable.tech
122121
resources:
@@ -173,6 +172,7 @@ rules:
173172
- pods
174173
verbs:
175174
- list
175+
# Required to report events from HDFS product pods.
176176
- apiGroups:
177177
- events.k8s.io
178178
resources:
@@ -181,6 +181,7 @@ rules:
181181
- create
182182
- patch
183183
{{ if .Capabilities.APIVersions.Has "security.openshift.io/v1" }}
184+
# Required on OpenShift to allow HDFS pods to run as a non-root user.
184185
- apiGroups:
185186
- security.openshift.io
186187
resources:
@@ -222,7 +223,7 @@ rules:
222223
verbs:
223224
- get
224225
- list
225-
# needed to query the crd version (v1alpha1 etc.) before fetching listeners
226+
# Required to discover the installed CRD API version before querying listeners.
226227
- apiGroups:
227228
- apiextensions.k8s.io
228229
resources:

0 commit comments

Comments
 (0)