How to set Helm setValues via env vars ?
Tried many variants:
ex:
setValues:
ingress.hosts[0]: {{.MYVAR}} <--- not parsed
image.pullPolicy: Never
Found this while searching for other things, hopefully it's still correct: https://github.com/GoogleContainerTools/skaffold/pull/347/commits/2da2629042c401fd901797db41506fd53e2c7aea
(not tested)
setValues:
some.other.key: ${PWD}/mypath
Skaffold version v0.36.0
Tried all below also, did not work!
export MYVAR=Never
```setValues:
image.pullPolicy: ${MYVAR} <---- did not parse env var
```setValues:
image.pullPolicy: "${MYVAR}" <---- did not parse env var
```setValues:
image.pullPolicy: '${MYVAR}' <---- did not parse env var
```setValues:
image.pullPolicy: {{.MYVAR}} <---- did not parse env var
setValues:
image.pullPolicy: "{{.MYVAR}}" <---- did not parse env var
Error: release ms-backend-local-dev failed: Deployment.apps "ms-backend-dev" is invalid: spec.template.spec.containers[0].imagePullPolicy: Unsupported value: "${MYVAR}": supported values: "Always", "IfNotPresent", "Never"
time="2019-08-26T09:41:23+02:00" level=fatal msg="creating runner: parsing skaffold config: unable to parse config: yaml: unmarshal errors:\n line 74: cannot unmarshal !!map into string"
Error: failed parsing --set data: key "}" has no value
@emichaf @devronhansen Have you tried setValueTemplates instead of setValues. This should support env variables interpolation.
I'm going to close this issue. I've just checked that it works well with this syntax:
setValueTemplates:
ingress.hosts[0]: {{.MYVAR}}
image.pullPolicy: Never
Most helpful comment
I'm going to close this issue. I've just checked that it works well with this syntax: