Commit aa9bc83
fix(flux): render-infra dropped all but the first substitute variable
renderKustomization joined every parameter into one comma-separated
--parameters string. `substitute` cannot survive that: its value is itself
a comma-separated list, so the join destroyed the boundary before the KCL
module saw it, and the module's own split then kept only the first pair.
The code exempted `substitute` from its own comma check with the comment
"the module parses it that way" -- but by then there was nothing left to
parse correctly.
It failed silently, which is the worst part. The render succeeded and
produced valid-looking Kustomizations. Measured on test-infra1 2026-08-24,
rendering that cluster's own eight components:
cilium-lb 2 variables in -> 1 out (no CILIUM_LB_IP_STOP)
cilium-gateway 4 in -> 1 out (no domain, no TLS secret)
cert-manager-selfsigned 8 in -> 1 out
trust-manager 3 in -> 1 out
flux-web / headlamp 6 in -> 1 out each
Applied, the wildcard certificate would have been issued for the sentinel
set-INFRA_DOMAIN.invalid and the Gateway would have had no TLS secret.
Parameters now travel as a YAML file via --parameters-file, the channel
the KCL module offers for exactly this. A YAML document has no such
ambiguity. After the fix all eight components carry exactly the variables
the values file names, and the rendered paths and substitute maps match
the live cluster wherever the values file spells a value out.
Also adds examples/infra-values-test-infra1.yaml: a full eight-component
set describing a real cluster, which is what made the comparison possible.
It carries certManagerVersion explicitly, and the comment says why -- the
KCL module pins v1.19.1 as its own default and writes it as an explicit
substitute, which beats the base default of v1.21.1. Without that line an
apply downgrades cert-manager by two minor versions, silently. The module
pin is worth bumping separately.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EYkrt9hhBe7ei2d6v3Wudv1 parent ee9f54c commit aa9bc83
2 files changed
Lines changed: 109 additions & 13 deletions
| 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 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
| |||
322 | 323 | | |
323 | 324 | | |
324 | 325 | | |
325 | | - | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
326 | 342 | | |
327 | | - | |
328 | | - | |
329 | | - | |
330 | | - | |
331 | | - | |
332 | | - | |
333 | | - | |
334 | | - | |
335 | | - | |
| 343 | + | |
336 | 344 | | |
337 | 345 | | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
338 | 350 | | |
339 | 351 | | |
340 | 352 | | |
| |||
344 | 356 | | |
345 | 357 | | |
346 | 358 | | |
347 | | - | |
348 | | - | |
349 | | - | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
350 | 362 | | |
351 | 363 | | |
352 | 364 | | |
| |||
0 commit comments