Repository navigation
Commit 11bc9eb
fix(deployment): quote ConfigMap values with %q, as the go agents already do (#79)
A rendered ConfigMap value is an arbitrary string — a JSON document, a
comma-joined list, a sentence. This template wrapped it in hand-written
quotes, so the first " inside a value closed the string early and the rest
of it became YAML. The render then refused its own output:
configmap.yaml: yaml: line 6: did not find expected key
and deleted the tree it had just written, leaving nothing to read, which is
why it took a template comparison rather than a log to find.
service-go and service-go-grpc already render `{{ printf "%q" $value }}`;
only this agent and service-nextjs did not, so the same defect is open there
and is being fixed separately.
The secret template is deliberately untouched: a Secret's `data` holds
base64, which contains nothing that breaks naive quoting, and the go agents
quote it the same way.
The test executes the template directly rather than through the agent's
deployment path, because the fault is the template's quoting and nothing
above it — a test needing core's deployment wrapper to reach this line would
not say where the fault is. It fails on the old template with the same
"not parseable YAML" symptom seen in production, and the assertion is that
the document parses AND each value survives byte for byte.
Found rendering platform-obin's staging deployment for the Lane 3 Catalogue;
the module that hit it is a python-fastapi service whose configuration
carries a JSON value.
Co-authored-by: Antoine Toussaint <312536060+antoinetoussaint-byte@users.noreply.github.com>
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>1 parent 83dc764 commit 11bc9eb
2 files changed
Lines changed: 57 additions & 1 deletion
File tree
- templates/deployment/kustomize/overlays/environment
| 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 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
9 | 9 | | |
0 commit comments