Commit 88d1e3a
Remove unnecessary RBAC verbs
Applied principle of least privilege across all RBAC markers in
openstacklightspeed_controller.go. Verbs were removed where code
analysis confirmed they are never exercised by the controller or
the controller-runtime framework.
ClusterRole changes:
- openstacklightspeeds: removed create, delete, update; get, list,
watch, patch are sufficient for normal reconciliation
- openstacklightspeeds/status: removed get, update; only patch is
needed to update the status subresource
- clusterroles: removed update, delete; CreateOrPatch uses
get/create/patch, bulk removal uses deletecollection (DeleteAllOf)
- clusterrolebindings: same reasoning as clusterroles
- clusterversions: removed watch only; list is retained because the
operator grants list to the app-server SAR ClusterRole and cannot
grant permissions it does not hold
- consoleplugins: removed update; get/list/watch/create/patch/delete
cover all actual operations
Role (namespaced) changes:
- clusterserviceversions: removed patch; only update and delete are
needed for owner reference and uninstall
- networkpolicies: removed update; CreateOrPatch uses get/create/patch
- deployments: removed update, delete; CreateOrPatch uses
get/create/patch; owned resources are GC'd by Kubernetes
- configmaps: removed update; get/list/watch/create/patch/delete cover
all actual operations (one ConfigMap is explicitly deleted on toggle)
- secrets: removed update, delete; bulk removal uses deletecollection
(DeleteAllOf); owned secrets are GC'd by Kubernetes
- services: removed update, delete; CreateOrPatch uses
get/create/patch; owned resources are GC'd by Kubernetes
- persistentvolumeclaims: removed update; get/list/watch/create/patch
cover all actual operations; PVCs are intentionally never deleted
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent e770335 commit 88d1e3a
3 files changed
Lines changed: 19 additions & 71 deletions
File tree
- bundle/manifests
- config/rbac
- internal/controller
Lines changed: 3 additions & 29 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
| 28 | + | |
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| |||
177 | 177 | | |
178 | 178 | | |
179 | 179 | | |
180 | | - | |
181 | 180 | | |
182 | 181 | | |
183 | 182 | | |
| |||
188 | 187 | | |
189 | 188 | | |
190 | 189 | | |
191 | | - | |
192 | 190 | | |
193 | 191 | | |
194 | 192 | | |
195 | 193 | | |
196 | 194 | | |
197 | 195 | | |
198 | | - | |
199 | | - | |
200 | 196 | | |
201 | 197 | | |
202 | 198 | | |
203 | | - | |
204 | 199 | | |
205 | 200 | | |
206 | 201 | | |
| |||
213 | 208 | | |
214 | 209 | | |
215 | 210 | | |
216 | | - | |
217 | 211 | | |
218 | | - | |
219 | 212 | | |
220 | 213 | | |
221 | 214 | | |
| |||
240 | 233 | | |
241 | 234 | | |
242 | 235 | | |
243 | | - | |
244 | 236 | | |
245 | 237 | | |
246 | 238 | | |
247 | 239 | | |
248 | | - | |
249 | 240 | | |
250 | 241 | | |
251 | 242 | | |
| |||
380 | 371 | | |
381 | 372 | | |
382 | 373 | | |
383 | | - | |
384 | 374 | | |
385 | 375 | | |
386 | 376 | | |
387 | 377 | | |
388 | 378 | | |
389 | 379 | | |
390 | | - | |
391 | 380 | | |
392 | 381 | | |
393 | 382 | | |
394 | 383 | | |
395 | 384 | | |
| 385 | + | |
| 386 | + | |
396 | 387 | | |
397 | 388 | | |
398 | 389 | | |
399 | 390 | | |
400 | 391 | | |
401 | | - | |
402 | 392 | | |
403 | 393 | | |
404 | 394 | | |
405 | 395 | | |
406 | 396 | | |
407 | 397 | | |
408 | 398 | | |
409 | | - | |
410 | 399 | | |
411 | 400 | | |
412 | 401 | | |
413 | 402 | | |
414 | | - | |
415 | | - | |
416 | | - | |
417 | | - | |
418 | | - | |
419 | | - | |
420 | | - | |
421 | | - | |
422 | | - | |
423 | | - | |
424 | | - | |
425 | 403 | | |
426 | 404 | | |
427 | 405 | | |
428 | 406 | | |
429 | 407 | | |
430 | 408 | | |
431 | 409 | | |
432 | | - | |
433 | 410 | | |
434 | 411 | | |
435 | 412 | | |
436 | | - | |
437 | 413 | | |
438 | 414 | | |
439 | 415 | | |
| |||
444 | 420 | | |
445 | 421 | | |
446 | 422 | | |
447 | | - | |
448 | 423 | | |
449 | 424 | | |
450 | 425 | | |
451 | 426 | | |
452 | 427 | | |
453 | 428 | | |
454 | 429 | | |
455 | | - | |
456 | 430 | | |
457 | 431 | | |
458 | 432 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
23 | 22 | | |
24 | 23 | | |
25 | 24 | | |
| |||
30 | 29 | | |
31 | 30 | | |
32 | 31 | | |
33 | | - | |
34 | 32 | | |
35 | 33 | | |
36 | 34 | | |
37 | 35 | | |
38 | 36 | | |
39 | 37 | | |
40 | | - | |
41 | | - | |
42 | 38 | | |
43 | 39 | | |
44 | 40 | | |
45 | | - | |
46 | 41 | | |
47 | 42 | | |
48 | 43 | | |
| |||
55 | 50 | | |
56 | 51 | | |
57 | 52 | | |
58 | | - | |
59 | 53 | | |
60 | | - | |
61 | 54 | | |
62 | 55 | | |
63 | 56 | | |
| |||
82 | 75 | | |
83 | 76 | | |
84 | 77 | | |
85 | | - | |
86 | 78 | | |
87 | 79 | | |
88 | 80 | | |
89 | 81 | | |
90 | | - | |
91 | 82 | | |
92 | 83 | | |
93 | 84 | | |
| |||
100 | 91 | | |
101 | 92 | | |
102 | 93 | | |
103 | | - | |
104 | 94 | | |
105 | 95 | | |
106 | 96 | | |
107 | 97 | | |
108 | 98 | | |
109 | 99 | | |
110 | | - | |
111 | 100 | | |
112 | 101 | | |
113 | 102 | | |
114 | 103 | | |
115 | 104 | | |
| 105 | + | |
| 106 | + | |
116 | 107 | | |
117 | 108 | | |
118 | 109 | | |
119 | 110 | | |
120 | 111 | | |
121 | | - | |
122 | 112 | | |
123 | 113 | | |
124 | 114 | | |
125 | 115 | | |
126 | 116 | | |
127 | 117 | | |
128 | 118 | | |
129 | | - | |
130 | 119 | | |
131 | 120 | | |
132 | 121 | | |
133 | 122 | | |
134 | | - | |
135 | | - | |
136 | | - | |
137 | | - | |
138 | | - | |
139 | | - | |
140 | | - | |
141 | | - | |
142 | | - | |
143 | | - | |
144 | | - | |
145 | 123 | | |
146 | 124 | | |
147 | 125 | | |
148 | 126 | | |
149 | 127 | | |
150 | 128 | | |
151 | 129 | | |
152 | | - | |
153 | 130 | | |
154 | 131 | | |
155 | 132 | | |
156 | | - | |
157 | 133 | | |
158 | 134 | | |
159 | 135 | | |
| |||
164 | 140 | | |
165 | 141 | | |
166 | 142 | | |
167 | | - | |
168 | 143 | | |
169 | 144 | | |
170 | 145 | | |
171 | 146 | | |
172 | 147 | | |
173 | 148 | | |
174 | 149 | | |
175 | | - | |
176 | 150 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
57 | | - | |
58 | | - | |
| 57 | + | |
| 58 | + | |
59 | 59 | | |
60 | | - | |
61 | | - | |
| 60 | + | |
| 61 | + | |
62 | 62 | | |
63 | | - | |
64 | | - | |
| 63 | + | |
| 64 | + | |
65 | 65 | | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
71 | 71 | | |
72 | | - | |
73 | | - | |
74 | | - | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
| |||
0 commit comments