@@ -55,10 +55,30 @@ rules:
5555 - list
5656 - watch
5757 {{- end }}
58+ # Secrets: read/written by several subsystems:
59+ # - autoTLS backend: reads and writes the CA Secret using the kube entry API, which issues
60+ # replace() (HTTP PUT) when updating an existing entry — this requires the `update` verb
61+ # in addition to the SSA verbs (create + patch). Also reads ConfigMap/Secret trust roots.
62+ # - kerberosKeytab backend: reads the admin keytab Secret.
63+ # - k8sSearch backend: lists Secrets by label selector.
64+ # - certManager backend: reads the Secret provisioned by cert-manager.
65+ # - truststore controller: applies Secrets via SSA (create + patch) and watches them via .owns().
5866 - apiGroups :
5967 - " "
6068 resources :
6169 - secrets
70+ verbs :
71+ - get
72+ - list
73+ - watch
74+ - create
75+ - patch
76+ - update
77+ # Events (core v1): required by the external-provisioner sidecar container, which runs under the
78+ # same ServiceAccount and uses the legacy core/v1 events API (distinct from events.k8s.io below).
79+ - apiGroups :
80+ - " "
81+ resources :
6282 - events
6383 verbs :
6484 - get
6787 - create
6888 - patch
6989 - update
90+ # ConfigMaps: applied by the truststore controller via SSA (create + patch) and watched via
91+ # .owns() and .watches(). Also read by the autoTLS backend for additional trust roots and
92+ # by the k8sSearch backend for the trust-store ConfigMap.
7093 - apiGroups :
7194 - " "
7295 resources :
@@ -77,6 +100,8 @@ rules:
77100 - get
78101 - watch
79102 - list
103+ # PersistentVolumes: managed by the external-provisioner sidecar container (not the operator
104+ # binary directly). The sidecar creates, patches, and deletes PVs on behalf of the CSI driver.
80105 - apiGroups :
81106 - " "
82107 resources :
@@ -88,10 +113,13 @@ rules:
88113 - patch
89114 - create
90115 - delete
116+ # Nodes: read by the CSI node service to look up node IPs for certificate SANs, and by the
117+ # external-provisioner sidecar for topology-aware scheduling.
118+ # PersistentVolumeClaims: read by the CSI controller service during CreateVolume to locate the
119+ # owning Pod and resolve listener scope, and by the external-provisioner sidecar for PVC binding.
91120 - apiGroups :
92121 - " "
93122 resources :
94- - configmaps
95123 - nodes
96124 - persistentvolumeclaims
97125 verbs :
@@ -105,6 +133,9 @@ rules:
105133 - nodes/proxy
106134 verbs :
107135 - get
136+ # CSINodes: used by the external-provisioner sidecar and node-driver-registrar for
137+ # topology-aware volume scheduling.
138+ # StorageClasses: used by the external-provisioner sidecar to read provisioner configuration.
108139 - apiGroups :
109140 - storage.k8s.io
110141 resources :
@@ -114,18 +145,25 @@ rules:
114145 - get
115146 - list
116147 - watch
148+ # Pods: read by the CSI controller and node services to resolve secret scope (node IPs, service
149+ # names). Patched with expiry annotations so the restarter can evict pods before their
150+ # certificates expire.
117151 - apiGroups :
118152 - " "
119153 resources :
120154 - pods
121155 verbs :
122156 - get
123157 - patch
158+ # SecretClasses: the primary configuration CRD.
159+ # - watched via .watches_stream() in the truststore controller to trigger re-reconciliation
160+ # when a referenced SecretClass changes.
161+ # - read in reconcile() to initialise the secret backend.
162+ # - create + patch (when CRD maintenance is enabled): used to deploy the default "tls" SecretClass.
124163 - apiGroups :
125164 - secrets.stackable.tech
126165 resources :
127166 - secretclasses
128- - truststores
129167 verbs :
130168 {{- if .Values.maintenance.customResourceDefinitions.maintain }}
131169 - create
@@ -134,6 +172,20 @@ rules:
134172 - get
135173 - watch
136174 - list
175+ # TrustStores: the primary reconciled resource in the truststore controller
176+ # (Controller::new watches this type). The operator only reconciles existing TrustStores;
177+ # it never creates them, so no create/patch is needed here.
178+ - apiGroups :
179+ - secrets.stackable.tech
180+ resources :
181+ - truststores
182+ verbs :
183+ - get
184+ - watch
185+ - list
186+ # ListenerClasses, Listeners, PodListeners: read during volume provisioning to resolve
187+ # listener-scoped addresses (IPs/hostnames) for inclusion in TLS SANs and for topology
188+ # node pinning.
137189 - apiGroups :
138190 - listeners.stackable.tech
139191 resources :
@@ -142,6 +194,9 @@ rules:
142194 - podlisteners
143195 verbs :
144196 - get
197+ # cert-manager Certificates: applied via SSA (create + patch) by the certManager backend
198+ # when provisioning a certificate, and read back (get) to check topology node affinity for
199+ # re-scheduling decisions.
145200 - apiGroups :
146201 - cert-manager.io
147202 resources :
@@ -150,6 +205,8 @@ rules:
150205 - get
151206 - patch
152207 - create
208+ # Events (events.k8s.io): used by the kube-rs controller event recorder (distinct from
209+ # the legacy core/v1 events used by the external-provisioner sidecar above).
153210 - apiGroups :
154211 - events.k8s.io
155212 resources :
0 commit comments