Closed gobengo closed 5 years ago
@gobengo Hi! Which version of helmfile do you use?
In case you're using older releases of helmfile, could you try again with a more recent one, like v0.17.0?
I just tried on v0.20.0 tag in this reduced test case https://gitlab.ops.bengo.is/bugs/helmfile-env
output:
$ TILLER_NAMESPACE=helm ./reproduce_bug
exec: helm repo update
Hang tight while we grab the latest from your chart repositories...
...Skip local chart repository
...Successfully got an update from the "bengo" chart repository
...Successfully got an update from the "monocular" chart repository
...Successfully got an update from the "akomljen-charts" chart repository
...Successfully got an update from the "gitlab" chart repository
...Successfully got an update from the "charts.gitlab.io" chart repository
...Successfully got an update from the "stable" chart repository
...Successfully got an update from the "coreos" chart repository
Update Complete. ⎈ Happy Helming!⎈
exec: helm dependency update /home/bengo/dev/bugs/helmfile-env/charts/apps
No requirements found in /home/bengo/dev/bugs/helmfile-env/charts/apps/charts.
exec: helm upgrade --install --reset-values apps /home/bengo/dev/bugs/helmfile-env/charts/apps --namespace default --values /tmp/values008400334
Error: UPGRADE FAILED: render error in "apps/templates/deployment.yaml": template: apps/templates/deployment.yaml:24:28: executing "apps/templates/deployment.yaml" at <.Values.image.reposi...>: can't evaluate field repository in type interface {}
err: exit status 1
For now I can prepare each environment variable ahead of running helmfile
now, but what I really want to have is one script that will print my yaml values on stdout, and then be able to use that whole set of yaml values (not many different env vars) with one of the releases in a helmfile.
@gobengo How about this?
APPS_CHART_VALUES=<(./values) helmfile sync
@mumoshu I think it worked! https://gitlab.ops.bengo.is/bugs/helmfile-env/commit/f9d748c19822a94924ac9d0211cfa5a48fa9782a
I was not familiar with that bash syntax. I guess it basically makes the values output 'look like' a file path to the helmfile
program. So then helmfile can just read values from a file, which is already supported.
Thanks for the advice!
Hi @gobengo, i have a similar issue, could you post your answer here? The link you provided doesn't work :)
I have a script that prepares the values for my app, and I'd like to use the computed value in my helmfile.
and then
But I get an error
In a helm template I can sometimes use the 'toYaml' function, but it is not around in helmfile templates..