Document metadata-value separately from string-map

The helper was inserted directly beneath the comment describing
string-map, leaving it undocumented and the comment attached to the
wrong define. Give each its own comment, matching the stable chart.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
Nikola Jokic
2026-09-09 11:58:34 +02:00
co-authored by Copilot App
parent 7fba61cf52
commit 330cca2a7f
@@ -1,7 +1,8 @@
{{/*
Render a labels or annotations map with all values coerced to strings.
Kubernetes only accepts string values, so scalars such as `true` or `1` must not be
rendered as YAML booleans or numbers.
Render a single label or annotation value as a string.
Values from a values file arrive as float64, so "%v" would turn large integers into
scientific notation (12345678901234 -> 1.2345678901234e+13) and silently write a value the
user never asked for. Integral floats are therefore formatted without an exponent.
*/}}
{{- define "metadata-value" -}}
{{- if and (kindIs "float64" .) (eq . (floor .)) -}}
@@ -11,6 +12,11 @@ rendered as YAML booleans or numbers.
{{- end -}}
{{- end }}
{{/*
Render a labels or annotations map with all values coerced to strings.
Kubernetes only accepts string values, so scalars such as `true` or `1` must not be
rendered as YAML booleans or numbers.
*/}}
{{- define "string-map" -}}
{{- $out := dict -}}
{{- range $k, $v := . -}}