Repository navigation
Commit 96da8a6
fix: make OLM webhook CSV patch version-independent and non-duplicative (#210)
Follow-up to #209.
- Target the ClusterServiceVersion by kind only, both in the post-generation
webhook patch and in the manifests patch component. The CSV name embeds
VERSION, so a hard-coded `model-validation-operator.v1.0.0` target would
silently stop matching after a version bump.
- Replace the full hand-copied webhookdefinitions override with a minimal
JSON6902 patch. Operator SDK already derives rules, selectors, failure
policy and deploymentName from config/webhook; only containerPort,
targetPort and serviceName need correcting. A `test` op guards against
patching the wrong entry if webhooks are added or reordered.
- Drop the webhook patch from the manifests component, since
`operator-sdk generate bundle` regenerates webhookdefinitions anyway.
`make bundle` produces webhook definitions identical to the committed
bundles, and `make bundle-kubernetes VERSION=1.0.1` now yields a correctly
patched model-validation-operator.v1.0.1 CSV.
Signed-off-by: Nina Bongartz <pninak@web.de>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>1 parent 555bb59 commit 96da8a6
3 files changed
Lines changed: 21 additions & 39 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
358 | 358 | | |
359 | 359 | | |
360 | 360 | | |
361 | | - | |
| 361 | + | |
| 362 | + | |
362 | 363 | | |
363 | 364 | | |
364 | 365 | | |
| |||
376 | 377 | | |
377 | 378 | | |
378 | 379 | | |
379 | | - | |
380 | 380 | | |
381 | 381 | | |
382 | 382 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
3 | | - | |
4 | | - | |
5 | | - | |
6 | | - | |
7 | | - | |
8 | | - | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
0 commit comments