Commit 36f209a
committed
Return error when customizing non-existent containers
Previously, when a user specified container customizations in the provider
spec for a container that doesn't exist in the deployment, the operator
would silently ignore the configuration. This made it difficult to debug
misconfigured provider specs.
This change adds error handling to the `customizeContainer` function to
return an error when no matching container is found in the deployment.
The error message includes both the container name and deployment name
to help users quickly identify and fix the issue.
This makes the error handling consistent with the existing pattern used
for manager container validation.1 parent 4eaea1d commit 36f209a
File tree
2 files changed
+27
-6
lines changed- internal/controller
2 files changed
+27
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
128 | 128 | | |
129 | 129 | | |
130 | 130 | | |
131 | | - | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
132 | 134 | | |
133 | 135 | | |
134 | 136 | | |
| |||
146 | 148 | | |
147 | 149 | | |
148 | 150 | | |
149 | | - | |
| 151 | + | |
150 | 152 | | |
151 | 153 | | |
152 | 154 | | |
| |||
173 | 175 | | |
174 | 176 | | |
175 | 177 | | |
176 | | - | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
177 | 181 | | |
| 182 | + | |
| 183 | + | |
178 | 184 | | |
179 | 185 | | |
180 | 186 | | |
| |||
299 | 305 | | |
300 | 306 | | |
301 | 307 | | |
302 | | - | |
| 308 | + | |
303 | 309 | | |
304 | 310 | | |
305 | 311 | | |
| |||
322 | 328 | | |
323 | 329 | | |
324 | 330 | | |
325 | | - | |
326 | 331 | | |
327 | | - | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
328 | 335 | | |
| 336 | + | |
| 337 | + | |
329 | 338 | | |
330 | 339 | | |
331 | 340 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
611 | 611 | | |
612 | 612 | | |
613 | 613 | | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
| 623 | + | |
| 624 | + | |
| 625 | + | |
614 | 626 | | |
615 | 627 | | |
616 | 628 | | |
| |||
0 commit comments