roboll / helmfile

Deploy Kubernetes Helm Charts

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Template values set to "off" are redered as "false"

readverish opened this issue · comments

When setting a value to "off" in a values template, the rendered manifests contains a value "false".

Example:
headers: {{ .Values | get "env.headers" "off" }}

Is rendered as:
headers: "false"

when running helmfile template. This is the case whether the environment file has env.headers set to "off" or not set at all (takes the default).

I also tried setting the value to "on", and it sets it to "true".

@readverish Hey! You seem to have discovered how YAML works. Was your goal to literally say off, not the bool value? Then use "off" or "on". In Go template you can use quote to add double-quotes around the input, so you might find this handy: {{ .Values | get "env.headers" "off" | quote }}.