You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Error instead of silently truncating split set values
helm's value parser treats "," as a separator between assignments, so a set,
set_sensitive or set_list value containing an unescaped comma is split. The key
keeps only the text before the comma and the remainder is applied as unrelated
keys.
When that remainder contains no "=", strvals reports "key ... has no value" and
the apply fails, which is how this is usually noticed. When it does contain one
-- a PEM bundle, a base64 blob, a comment header -- it parses cleanly instead,
so the release is applied with a truncated value and helm exits 0. Nothing in
the plan or the apply output indicates anything was dropped.
A single set entry is expected to produce exactly one leaf, and a set_list entry
as many elements as it was given. Both are now checked before the value is
parsed into the release config, and a mismatch is reported with the escape that
fixes it. Brace list syntax ("{a,b}") still parses to one leaf, so it keeps
working.
The error path leaked as well, and is fixed with it. The parser errors quote the
fragment they choked on, which for a split value is the part after the comma, so
interpolating one into a diagnostic printed part of a set_sensitive or set_wo
value in plan output:
Failed parsing key "secrets.token": key " MORE-SECRET-MATERIAL" has no value
getValue now takes whether the entry is sensitive and withholds the underlying
error for those, giving the escaping hint instead; set_wo counts, since
write-only values are secrets by construction. Non-sensitive entries keep the
parser error, which is the more useful diagnostic where nothing is at stake. The
set_sensitive loop also logged its whole model at debug level, and %v on it
renders the value, so it now logs the key name alone.
Verified against chart 1.3.13 driven with helm: a 248KB, 146-certificate bundle
containing commas and backslashes renders byte-identical when escaped, and the
same bundle unescaped reproduces the truncation.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
`resource/helm_release`: Report an error instead of silently truncating a `set`, `set_sensitive` or `set_list` value that helm's value parser would split on an unescaped comma.
3
+
```
4
+
5
+
```release-note:bug
6
+
`resource/helm_release`: Stop `set_sensitive` and `set_wo` values from reaching plan output and debug logs through parser error messages.
0 commit comments