@@ -43,22 +43,40 @@ metadata:
4343 labels :
4444 {{- include "operator.labels" . | nindent 4 }}
4545rules :
46- # Required to maintain the CRD. The operator needs to do this, as it needs to enter e.g. it's
47- # generated certificate in the conversion webhook.
48- {{- if .Values.maintenance.customResourceDefinitions.maintain }}
46+ # Required for maintaining the CRDs (including the conversion webhook configuration) and
47+ # for the startup condition check.
4948 - apiGroups : [apiextensions.k8s.io]
5049 resources : [customresourcedefinitions]
5150 verbs :
51+ {{- if .Values.maintenance.customResourceDefinitions.maintain }}
52+ # Required to maintain the CRD (e.g. conversion webhook certificate).
5253 - create
5354 - patch
55+ {{- end }}
5456 # Required for startup condition
5557 - list
5658 - watch
57- {{- end }}
59+ # Secrets are read and written by multiple backends (autoTLS CA storage, Kerberos keytab,
60+ # k8sSearch, cert-manager). The autoTLS backend uses replace (HTTP PUT) for CA entries,
61+ # requiring the update verb in addition to SSA verbs. The truststore controller applies
62+ # trust-store Secrets via SSA and watches them for changes.
5863 - apiGroups :
5964 - " "
6065 resources :
6166 - secrets
67+ verbs :
68+ - get
69+ - list
70+ - watch
71+ - create
72+ - patch
73+ - update
74+ # Required by the external-provisioner sidecar, which still uses the legacy core/v1 events
75+ # API (not events.k8s.io). See upstream RBAC:
76+ # https://github.com/kubernetes-csi/external-provisioner/blob/v5.3.0/deploy/kubernetes/rbac.yaml
77+ - apiGroups :
78+ - " "
79+ resources :
6280 - events
6381 verbs :
6482 - get
6785 - create
6886 - patch
6987 - update
88+ # ConfigMaps are applied by the truststore controller via SSA and watched for changes.
89+ # Also read by the autoTLS backend for trust roots and by the k8sSearch backend.
7090 - apiGroups :
7191 - " "
7292 resources :
7797 - get
7898 - watch
7999 - list
100+ # PersistentVolumes are managed by the external-provisioner sidecar on behalf of the CSI driver.
80101 - apiGroups :
81102 - " "
82103 resources :
@@ -88,23 +109,29 @@ rules:
88109 - patch
89110 - create
90111 - delete
112+ # Nodes are fetched to look up node IPs for certificate SANs. The external-provisioner
113+ # sidecar lists and watches Nodes for CSI volume topology (--feature-gates=Topology=true).
114+ # PersistentVolumeClaims are read by the CSI controller during CreateVolume to locate the
115+ # owning Pod and resolve listener scope. The external-provisioner sidecar watches PVCs to
116+ # trigger PV provisioning.
91117 - apiGroups :
92118 - " "
93119 resources :
94- - configmaps
95120 - nodes
96121 - persistentvolumeclaims
97122 verbs :
98123 - get
99124 - list
100125 - watch
101- # For automatic cluster domain detection
126+ # For automatic cluster domain detection.
102127 - apiGroups :
103128 - " "
104129 resources :
105130 - nodes/proxy
106131 verbs :
107132 - get
133+ # Required by the external-provisioner sidecar to discover driver topology keys (CSINodes)
134+ # and determine volume binding mode (StorageClasses).
108135 - apiGroups :
109136 - storage.k8s.io
110137 resources :
@@ -114,18 +141,22 @@ rules:
114141 - get
115142 - list
116143 - watch
144+ # Pods are read by the CSI driver to resolve secret scope. Patched with expiry annotations
145+ # so the restarter can evict pods before their certificates expire.
117146 - apiGroups :
118147 - " "
119148 resources :
120149 - pods
121150 verbs :
122151 - get
123152 - patch
153+ # SecretClasses are the primary configuration CRD. Read by the CSI controller and the
154+ # truststore controller. Watched to retrigger reconciliation when a SecretClass changes.
155+ # The operator creates the default "tls" SecretClass at startup when CRD maintenance is enabled.
124156 - apiGroups :
125157 - secrets.stackable.tech
126158 resources :
127159 - secretclasses
128- - truststores
129160 verbs :
130161 {{- if .Values.maintenance.customResourceDefinitions.maintain }}
131162 - create
@@ -134,6 +165,16 @@ rules:
134165 - get
135166 - watch
136167 - list
168+ # TrustStores are the primary reconciled resource in the truststore controller.
169+ - apiGroups :
170+ - secrets.stackable.tech
171+ resources :
172+ - truststores
173+ verbs :
174+ - get
175+ - watch
176+ - list
177+ # Read during volume provisioning to resolve listener-scoped addresses for TLS SANs.
137178 - apiGroups :
138179 - listeners.stackable.tech
139180 resources :
@@ -142,6 +183,8 @@ rules:
142183 - podlisteners
143184 verbs :
144185 - get
186+ # cert-manager Certificates are applied via SSA by the cert-manager backend when provisioning
187+ # a certificate, and read back to check node affinity for scheduling decisions.
145188 - apiGroups :
146189 - cert-manager.io
147190 resources :
@@ -150,6 +193,7 @@ rules:
150193 - get
151194 - patch
152195 - create
196+ # Publish reconciliation errors as Kubernetes Events.
153197 - apiGroups :
154198 - events.k8s.io
155199 resources :
@@ -158,6 +202,8 @@ rules:
158202 - create
159203 - patch
160204{{ if .Capabilities.APIVersions.Has "security.openshift.io/v1" }}
205+ # Required on OpenShift to allow the secret-operator pods to run with the custom SCC
206+ # defined above (host-path volumes and bidirectional mount propagation for the CSI driver).
161207 - apiGroups :
162208 - security.openshift.io
163209 resourceNames :
0 commit comments