Commit 664cc1d
fix(janitor): apply ExtRR review feedback (init, dispatch comment, RBAC msg)
* Drop the defensive nil-spec check in Reconcile. With failurePolicy=Fail
on the validating webhook, a poison-pill object can never land on the
apiserver — the check was dead code.
* Combine reconcileInitialize's two passes into one. setInitialConditions
already re-fetches before patching, so the rv bump from the finalizer
Update doesn't matter; we save a watch round-trip per ExtRR.
* Tighten the dispatch default-case comment: Released=False (terminal
apply failure) also falls through here, not just Released=True awaiting
the external system.
* Rename the forbidden-error condition message from "forbidden to patch
node ..." to "RBAC forbids patching node ..." so the operator-visible
reason is unambiguous.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 067f3d5 commit 664cc1d
2 files changed
Lines changed: 14 additions & 27 deletions
File tree
- janitor/pkg/controller
Lines changed: 6 additions & 16 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
121 | 121 | | |
122 | 122 | | |
123 | 123 | | |
124 | | - | |
125 | | - | |
126 | | - | |
127 | | - | |
128 | | - | |
129 | | - | |
130 | | - | |
131 | | - | |
132 | | - | |
133 | 124 | | |
134 | 125 | | |
135 | 126 | | |
| |||
181 | 172 | | |
182 | 173 | | |
183 | 174 | | |
184 | | - | |
185 | | - | |
186 | | - | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
187 | 178 | | |
188 | 179 | | |
189 | 180 | | |
| |||
196 | 187 | | |
197 | 188 | | |
198 | 189 | | |
199 | | - | |
200 | | - | |
201 | 190 | | |
202 | 191 | | |
203 | 192 | | |
| |||
269 | 258 | | |
270 | 259 | | |
271 | 260 | | |
272 | | - | |
| 261 | + | |
| 262 | + | |
273 | 263 | | |
274 | 264 | | |
275 | 265 | | |
| |||
341 | 331 | | |
342 | 332 | | |
343 | 333 | | |
344 | | - | |
| 334 | + | |
345 | 335 | | |
346 | 336 | | |
347 | 337 | | |
| |||
Lines changed: 8 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
203 | 203 | | |
204 | 204 | | |
205 | 205 | | |
206 | | - | |
207 | | - | |
208 | | - | |
209 | | - | |
210 | | - | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
211 | 210 | | |
212 | 211 | | |
213 | 212 | | |
214 | | - | |
| 213 | + | |
215 | 214 | | |
216 | 215 | | |
217 | 216 | | |
| |||
774 | 773 | | |
775 | 774 | | |
776 | 775 | | |
777 | | - | |
778 | | - | |
779 | | - | |
780 | | - | |
781 | | - | |
| 776 | + | |
| 777 | + | |
| 778 | + | |
782 | 779 | | |
783 | 780 | | |
784 | 781 | | |
| |||
0 commit comments