#helmfile (2019-09)
Questions and discussion around helmfile https://github.com/roboll/helmfile and https://github.com/cloudposse/helmfiles
Archive: https://archive.sweetops.com/helmfile/
2019-09-03
![Shikhar Goel avatar](https://secure.gravatar.com/avatar/a9e8ec5ef5f21477bcbe0d8c3fa01efb.jpg?s=72&d=https%3A%2F%2Fa.slack-edge.com%2Fdf10d%2Fimg%2Favatars%2Fava_0000-72.png)
Hi…Actually I have made a docker file that runs helmfile apply i want to get the status of ‘helmfile apply’.So that my job can fail if helmfile fails.
2019-09-05
![sung kang avatar](https://secure.gravatar.com/avatar/1ab647f0a621cb92ebfb5d9a302057ee.jpg?s=72&d=https%3A%2F%2Fa.slack-edge.com%2Fdf10d%2Fimg%2Favatars%2Fava_0002-72.png)
Can anyone help me debug why
values:
- runnerRegistrationToken: ""
installed: true
releases:
- name: {{ .Environment.Name }}
namespace: "gitlab"
labels:
chart: "gitlab-runner"
repo: "gitlab"
namespace: "gitlab"
vendor: "gitlab"
chart: "gitlab/gitlab-runner"
version: "v0.9.0"
wait: true
installed: {{ .Values.installed }}
tillerNamespace: "gitlab"
values:
- imagePullPolicy: Always
gitlabUrl: git.url.com
runnerRegistrationToken: {{ .Values.runnerRegistrationToken }}
runners:
tags: {{ .Environment.Name }},eks
serviceAccountName: "admin"
rbac:
create: true
bases:
- defaults.yaml
Results in releases/gitlab-runner.yaml: error during gitlab-runner.yaml.part.0 parsing: template: stringTemplate:16:25: executing "stringTemplate" at <.Values.installed>: map has no entry for key "installed"
![sung kang avatar](https://secure.gravatar.com/avatar/1ab647f0a621cb92ebfb5d9a302057ee.jpg?s=72&d=https%3A%2F%2Fa.slack-edge.com%2Fdf10d%2Fimg%2Favatars%2Fava_0002-72.png)
Calling it from my root helmfile like so:
# Deployment Stack
- path: releases/gitlab-runner.yaml
values:
- installed: {{ .Environment.Values | get "namespaces.installed" true }}
runnerRegistrationToken: {{ .Environment.Values.gitlab.runnerRegistrationToken }}
![sung kang avatar](https://secure.gravatar.com/avatar/1ab647f0a621cb92ebfb5d9a302057ee.jpg?s=72&d=https%3A%2F%2Fa.slack-edge.com%2Fdf10d%2Fimg%2Favatars%2Fava_0002-72.png)
I see this happen every now and then and can never figure out what I did to have it render properly
![sung kang avatar](https://secure.gravatar.com/avatar/1ab647f0a621cb92ebfb5d9a302057ee.jpg?s=72&d=https%3A%2F%2Fa.slack-edge.com%2Fdf10d%2Fimg%2Favatars%2Fava_0002-72.png)
I believe the states do get merged properly from the debug logs
first-pass produced: &{utility map[installed:false runnerRegistrationToken:foo] map[]}
first-pass rendering result of "gitlab-runner.yaml.part.0": {utility map[installed:false runnerRegistrationToken:foo] map[]}
second-pass rendering failed, input of "gitlab-runner.yaml.part.0":
![sung kang avatar](https://secure.gravatar.com/avatar/1ab647f0a621cb92ebfb5d9a302057ee.jpg?s=72&d=https%3A%2F%2Fa.slack-edge.com%2Fdf10d%2Fimg%2Favatars%2Fava_0002-72.png)
Hmm very odd, may be a bug. Unless I pass down a nested state value helmfile doesn’t seem to want to render.
![Nelson Jeppesen avatar](https://avatars.slack-edge.com/2019-06-19/672297459718_40810f21ee9c905123db_72.jpg)
Is it possible to have helmfile rollback a deployment if the pods return ErrImagePull
?
![Nelson Jeppesen avatar](https://avatars.slack-edge.com/2019-06-19/672297459718_40810f21ee9c905123db_72.jpg)
Have atomic
, force
and wait
set to true but it does not seem to do that
![Nelson Jeppesen avatar](https://avatars.slack-edge.com/2019-06-19/672297459718_40810f21ee9c905123db_72.jpg)
RESOURCES:
==> v1/Pod(related)
NAME READY STATUS RESTARTS AGE
testreplease-578d4r5sg 0/1 ErrImagePull 0 3s
testreplease-77b4n22hc 0/1 Terminating 0 6m12s
![Nelson Jeppesen avatar](https://avatars.slack-edge.com/2019-06-19/672297459718_40810f21ee9c905123db_72.jpg)
here you see it killing the old working pod with a new pod in ErrImagePull
status but reporting a success and not rolling back
![Nelson Jeppesen avatar](https://avatars.slack-edge.com/2019-06-19/672297459718_40810f21ee9c905123db_72.jpg)
I think I’ve got it figured out, in a way. If I use a replica greater than 1
, it works as I’d hope
![rms1000watt avatar](https://avatars.slack-edge.com/2023-12-08/6318001875107_13986079d7f8cfbeeec7_72.jpg)
can you explain? I might need some kubectl rollout status ...
&& kubectl rollout undo ..
equivalents in helmfile
![Nelson Jeppesen avatar](https://avatars.slack-edge.com/2019-06-19/672297459718_40810f21ee9c905123db_72.jpg)
Let me know if this makes sense
![Nelson Jeppesen avatar](https://avatars.slack-edge.com/2019-06-19/672297459718_40810f21ee9c905123db_72.jpg)
Lets say I have a helmfile deployment, with a replica of 2
![Nelson Jeppesen avatar](https://avatars.slack-edge.com/2019-06-19/672297459718_40810f21ee9c905123db_72.jpg)
then I do a second deployment updating that release with a missing docker image or maybe some other issue
![Nelson Jeppesen avatar](https://avatars.slack-edge.com/2019-06-19/672297459718_40810f21ee9c905123db_72.jpg)
when I tested the deploy it killed one of the two pods. Waited for it to go healthy - it never did, at which time helm/helmfile rolled back the release and it was back to running 2 healthy pods from the previous release
![Nelson Jeppesen avatar](https://avatars.slack-edge.com/2019-06-19/672297459718_40810f21ee9c905123db_72.jpg)
Does that help at all @rms1000watt?
![rms1000watt avatar](https://avatars.slack-edge.com/2023-12-08/6318001875107_13986079d7f8cfbeeec7_72.jpg)
Oh wait, so this happened automagically?
at which time helm/helmfile rolled back the release and it was back to running 2 healthy pods from the previous release
![rms1000watt avatar](https://avatars.slack-edge.com/2023-12-08/6318001875107_13986079d7f8cfbeeec7_72.jpg)
If so, then it’s all good
![Nelson Jeppesen avatar](https://avatars.slack-edge.com/2019-06-19/672297459718_40810f21ee9c905123db_72.jpg)
It did, but only with a replica of 2 or more. It wasn’t extensive testing though, so I’m not sure if there are edge cases I’m not aware of
![mumoshu avatar](https://secure.gravatar.com/avatar/8e045bf747ca7a90b1d955dc30217271.jpg?s=72&d=https%3A%2F%2Fa.slack-edge.com%2Fdf10d%2Fimg%2Favatars%2Fava_0015-72.png)
I havent read fully but if you do want safe k8s deployment even with 1 replicas, I’d suggest configuring maxUnavailable
and maxSurge
in your deployment accordingly
![mumoshu avatar](https://secure.gravatar.com/avatar/8e045bf747ca7a90b1d955dc30217271.jpg?s=72&d=https%3A%2F%2Fa.slack-edge.com%2Fdf10d%2Fimg%2Favatars%2Fava_0015-72.png)
For kubectl rollout status/undo
I guess the only option today would be to use helmfile postsync
hooks
2019-09-06
2019-09-09
![TBeijen avatar](https://secure.gravatar.com/avatar/84283305b4f7c826ac365cacf6c2f6b4.jpg?s=72&d=https%3A%2F%2Fa.slack-edge.com%2Fdf10d%2Fimg%2Favatars%2Fava_0020-72.png)
Hi. I recently started using Helmfile and now try to have 2 environments (clusters) deployed using Jenkins parallel pipeline steps. But one of them results in error because of missing env vars. It works fine if I disable the ‘other parallel step’. So… I think under the hood Helmfile
does some in place intermediate rendering that doesn’t play nice when 2 processes are operating on the same underlying workspace.
Does this look familiar or does anyone have tips on how to debug or where to dig for more information? (Short-term fix will be: No parallelisation)
![mumoshu avatar](https://secure.gravatar.com/avatar/8e045bf747ca7a90b1d955dc30217271.jpg?s=72&d=https%3A%2F%2Fa.slack-edge.com%2Fdf10d%2Fimg%2Favatars%2Fava_0015-72.png)
But one of them results in error because of missing env vars
Hey! Would you mind sharing the actual error message you had seen?
Helmfile does intermediate rendering thing but I’m not sure if it matters in this case.
![mumoshu avatar](https://secure.gravatar.com/avatar/8e045bf747ca7a90b1d955dc30217271.jpg?s=72&d=https%3A%2F%2Fa.slack-edge.com%2Fdf10d%2Fimg%2Favatars%2Fava_0015-72.png)
How does Jenkins parallel pipeline steps works? Does it share the workspace(=directory) across parallel steps - in this case multiple helmfile apply
runs?
![mumoshu avatar](https://secure.gravatar.com/avatar/8e045bf747ca7a90b1d955dc30217271.jpg?s=72&d=https%3A%2F%2Fa.slack-edge.com%2Fdf10d%2Fimg%2Favatars%2Fava_0015-72.png)
@TBeijen
![TBeijen avatar](https://secure.gravatar.com/avatar/84283305b4f7c826ac365cacf6c2f6b4.jpg?s=72&d=https%3A%2F%2Fa.slack-edge.com%2Fdf10d%2Fimg%2Favatars%2Fava_0020-72.png)
Yes. It shares the workspace. I managed to work around it by copying helmfile and all related files to /tmp. Both helmfile processes run in separate containers so then it’s isolated.
![TBeijen avatar](https://secure.gravatar.com/avatar/84283305b4f7c826ac365cacf6c2f6b4.jpg?s=72&d=https%3A%2F%2Fa.slack-edge.com%2Fdf10d%2Fimg%2Favatars%2Fava_0020-72.png)
Initially I was confused as on my local MacBook I found intermediate helmfile renders in tmp folder (as denoted by env var TMPDIR
)
![TBeijen avatar](https://secure.gravatar.com/avatar/84283305b4f7c826ac365cacf6c2f6b4.jpg?s=72&d=https%3A%2F%2Fa.slack-edge.com%2Fdf10d%2Fimg%2Favatars%2Fava_0020-72.png)
Yet in containers it didn’t seem to obey tmpdir and uses working dir?
![TBeijen avatar](https://secure.gravatar.com/avatar/84283305b4f7c826ac365cacf6c2f6b4.jpg?s=72&d=https%3A%2F%2Fa.slack-edge.com%2Fdf10d%2Fimg%2Favatars%2Fava_0020-72.png)
I scanned codebase a bit and seemed to notice it using os.tempDir
so that surprised me.
![mumoshu avatar](https://secure.gravatar.com/avatar/8e045bf747ca7a90b1d955dc30217271.jpg?s=72&d=https%3A%2F%2Fa.slack-edge.com%2Fdf10d%2Fimg%2Favatars%2Fava_0015-72.png)
Yeah it should write all the temp files(=rendered values.yaml files passed to helm “-f” flags) somewhere under the tempdir
![TBeijen avatar](https://secure.gravatar.com/avatar/84283305b4f7c826ac365cacf6c2f6b4.jpg?s=72&d=https%3A%2F%2Fa.slack-edge.com%2Fdf10d%2Fimg%2Favatars%2Fava_0020-72.png)
I can create a GitHub issue for it? It seems like a good option to be able to have it write temp files outside of the workspace.
![mumoshu avatar](https://secure.gravatar.com/avatar/8e045bf747ca7a90b1d955dc30217271.jpg?s=72&d=https%3A%2F%2Fa.slack-edge.com%2Fdf10d%2Fimg%2Favatars%2Fava_0015-72.png)
That would be great!
![TBeijen avatar](https://secure.gravatar.com/avatar/84283305b4f7c826ac365cacf6c2f6b4.jpg?s=72&d=https%3A%2F%2Fa.slack-edge.com%2Fdf10d%2Fimg%2Favatars%2Fava_0020-72.png)
Hmm, okay. I’m using the latest helmfile container. Might be how Jenkins does it’s magic that interferes with tmpdir behavior.
![TBeijen avatar](https://secure.gravatar.com/avatar/84283305b4f7c826ac365cacf6c2f6b4.jpg?s=72&d=https%3A%2F%2Fa.slack-edge.com%2Fdf10d%2Fimg%2Favatars%2Fava_0020-72.png)
Will create a gh issue later (on mobile now)
![mumoshu avatar](https://secure.gravatar.com/avatar/8e045bf747ca7a90b1d955dc30217271.jpg?s=72&d=https%3A%2F%2Fa.slack-edge.com%2Fdf10d%2Fimg%2Favatars%2Fava_0015-72.png)
Would you mind running helmfile with –log-level=debug, like helmfile --log-level=debug apply
so that we can see where helmfile is actually writing files in the parallel containers
![mumoshu avatar](https://secure.gravatar.com/avatar/8e045bf747ca7a90b1d955dc30217271.jpg?s=72&d=https%3A%2F%2Fa.slack-edge.com%2Fdf10d%2Fimg%2Favatars%2Fava_0015-72.png)
Okay! Thanks for your cooperation
![TBeijen avatar](https://secure.gravatar.com/avatar/84283305b4f7c826ac365cacf6c2f6b4.jpg?s=72&d=https%3A%2F%2Fa.slack-edge.com%2Fdf10d%2Fimg%2Favatars%2Fava_0020-72.png)
![TBeijen avatar](https://secure.gravatar.com/avatar/84283305b4f7c826ac365cacf6c2f6b4.jpg?s=72&d=https%3A%2F%2Fa.slack-edge.com%2Fdf10d%2Fimg%2Favatars%2Fava_0020-72.png)
Took some time (busy, busy): https://github.com/roboll/helmfile/issues/865
Experienced behaviour When executing Helmfile on Jenkins in parallel in 2 different containers, often one of the deploys fails because of missing vars. This suggests intermediate files being render…
2019-09-10
![erik-stephens avatar](https://secure.gravatar.com/avatar/aa8044308a41350c418a1d736dc39662.jpg?s=72&d=https%3A%2F%2Fa.slack-edge.com%2Fdf10d%2Fimg%2Favatars%2Fava_0017-72.png)
Hi, anyone able to get --args
working? I like helmfile diff --args='--context=2'
but it fails when using helmfiles
feature. I see this in debug log:
Building dependency release=foo, chart=../foo exec: helm dependency build ../foo –context=2 Basically, how do I inform it to only use
--context=2
when doinghelm diff
?
![mumoshu avatar](https://secure.gravatar.com/avatar/8e045bf747ca7a90b1d955dc30217271.jpg?s=72&d=https%3A%2F%2Fa.slack-edge.com%2Fdf10d%2Fimg%2Favatars%2Fava_0015-72.png)
Hey! Unfortunately it isn’t currently supported. (Actually it worked before but there was really no concrete specification on how --args
should work against any helmfile command that involves multiple helm commands.
![mumoshu avatar](https://secure.gravatar.com/avatar/8e045bf747ca7a90b1d955dc30217271.jpg?s=72&d=https%3A%2F%2Fa.slack-edge.com%2Fdf10d%2Fimg%2Favatars%2Fava_0015-72.png)
So the direction is https://github.com/roboll/helmfile/issues/787
Extracted from #768 (comment)
![mumoshu avatar](https://secure.gravatar.com/avatar/8e045bf747ca7a90b1d955dc30217271.jpg?s=72&d=https%3A%2F%2Fa.slack-edge.com%2Fdf10d%2Fimg%2Favatars%2Fava_0015-72.png)
But I’m considering to make helmfile diff --args
pass the args to helm diff
only as an interim fix
![mumoshu avatar](https://secure.gravatar.com/avatar/8e045bf747ca7a90b1d955dc30217271.jpg?s=72&d=https%3A%2F%2Fa.slack-edge.com%2Fdf10d%2Fimg%2Favatars%2Fava_0015-72.png)
@erik-stephens Does that make sense?
![erik-stephens avatar](https://secure.gravatar.com/avatar/aa8044308a41350c418a1d736dc39662.jpg?s=72&d=https%3A%2F%2Fa.slack-edge.com%2Fdf10d%2Fimg%2Favatars%2Fava_0017-72.png)
@mumoshu That’s perfect for me since that’s the only arg I care about right now. Thanks! Just an idea if ever revisit --args
, maybe deprecate that if too hairy and provide a way via helmDefaults.COMMAND.args
.
![mumoshu avatar](https://secure.gravatar.com/avatar/8e045bf747ca7a90b1d955dc30217271.jpg?s=72&d=https%3A%2F%2Fa.slack-edge.com%2Fdf10d%2Fimg%2Favatars%2Fava_0015-72.png)
helmDefaults.COMMAND.args
sounds great Thanks for your feedback!
![mumoshu avatar](https://secure.gravatar.com/avatar/8e045bf747ca7a90b1d955dc30217271.jpg?s=72&d=https%3A%2F%2Fa.slack-edge.com%2Fdf10d%2Fimg%2Favatars%2Fava_0015-72.png)
FYI: --context N
has been implemented today and is available since v0.84.0
2019-09-11
![Steve Nolen avatar](https://secure.gravatar.com/avatar/68e30cb376d16eb26dd447801d2507de.jpg?s=72&d=https%3A%2F%2Fa.slack-edge.com%2Fdf10d%2Fimg%2Favatars%2Fava_0015-72.png)
potentially a simple (albeit weird) question: Is there a way to inject the value passed to helmfile via --kube-context
into a variable of a release?
![Steve Nolen avatar](https://secure.gravatar.com/avatar/68e30cb376d16eb26dd447801d2507de.jpg?s=72&d=https%3A%2F%2Fa.slack-edge.com%2Fdf10d%2Fimg%2Favatars%2Fava_0015-72.png)
or potentially less abstractly, I’d like to know if there is a way to inject the name of the current cluster I’m operating on into a variable
![mumoshu avatar](https://secure.gravatar.com/avatar/8e045bf747ca7a90b1d955dc30217271.jpg?s=72&d=https%3A%2F%2Fa.slack-edge.com%2Fdf10d%2Fimg%2Favatars%2Fava_0015-72.png)
@Steve Nolen Hey! Interesting question. Unfortunately there’s no way but I believe it worth a feature request.
![Steve Nolen avatar](https://secure.gravatar.com/avatar/68e30cb376d16eb26dd447801d2507de.jpg?s=72&d=https%3A%2F%2Fa.slack-edge.com%2Fdf10d%2Fimg%2Favatars%2Fava_0015-72.png)
awesome, I’ll write it up!
in the meantime, I think I’ve got a solution for myself by using
helmDefaults:
kubeContext: {{ requiredEnv "KUBE_CONTEXT" | quote }}
when I force the env for setting context, I can then assume the env var is available in other locations and use it there. imperfect but it seems to work!
![Steve Nolen avatar](https://secure.gravatar.com/avatar/68e30cb376d16eb26dd447801d2507de.jpg?s=72&d=https%3A%2F%2Fa.slack-edge.com%2Fdf10d%2Fimg%2Favatars%2Fava_0015-72.png)
while i’m here @mumoshu, helmfile is a really, really great tool. Thank you for your efforts on it!
![mumoshu avatar](https://secure.gravatar.com/avatar/8e045bf747ca7a90b1d955dc30217271.jpg?s=72&d=https%3A%2F%2Fa.slack-edge.com%2Fdf10d%2Fimg%2Favatars%2Fava_0015-72.png)
thanks for kind words it really encourages me!
2019-09-12
2019-09-15
![yuri avatar](https://secure.gravatar.com/avatar/3c24de31230434f6a16844f2b9af7dbe.jpg?s=72&d=https%3A%2F%2Fa.slack-edge.com%2Fdf10d%2Fimg%2Favatars%2Fava_0015-72.png)
hey guys, helmfile newbie here, i’m looking to keep my all charts values in 1 file that defines an environment ppe.yaml
namespace: ppe-test
nginx:
replicas: 2
tag: 1.0.79
chart: stable/nginx
traefik:
replicas: 2
tag: 1.0.79
chart: stable/traefik
templates.yaml
templates:
default: &default
namespace: "{{ .Values.namespace }}"
missingFileHandler: Error
chart: "{{ `{{ .Release.Name }}`.chart }}"
values:
- envs/{{ .Environment.Name }}.yaml
helmfile.yaml
bases:
- envs/environments.yaml
---
{{ readFile "templates.yaml" }}
releases:
- name: nginx
<<: *default
is it possible to access the .Release.Name
and to pass it to env values?
![mumoshu avatar](https://secure.gravatar.com/avatar/8e045bf747ca7a90b1d955dc30217271.jpg?s=72&d=https%3A%2F%2Fa.slack-edge.com%2Fdf10d%2Fimg%2Favatars%2Fava_0015-72.png)
should be possible. but you’re asking because it didn’t work?
![yuri avatar](https://secure.gravatar.com/avatar/3c24de31230434f6a16844f2b9af7dbe.jpg?s=72&d=https%3A%2F%2Fa.slack-edge.com%2Fdf10d%2Fimg%2Favatars%2Fava_0015-72.png)
@mumoshu not really, i dont know if its possible to find a key inside that
chart: "{{ `{{ .Release.Name }}`.chart }}"
![yuri avatar](https://secure.gravatar.com/avatar/3c24de31230434f6a16844f2b9af7dbe.jpg?s=72&d=https%3A%2F%2Fa.slack-edge.com%2Fdf10d%2Fimg%2Favatars%2Fava_0015-72.png)
the chart part is less critical, im just looking for a way how to include all values in 1 env file to have multiple services, and pass values of each service to a specific release
2019-09-16
![Shikhar Goel avatar](https://secure.gravatar.com/avatar/a9e8ec5ef5f21477bcbe0d8c3fa01efb.jpg?s=72&d=https%3A%2F%2Fa.slack-edge.com%2Fdf10d%2Fimg%2Favatars%2Fava_0000-72.png)
Is rollback possible in helmfile…similar to rollback in helm
![starets avatar](https://secure.gravatar.com/avatar/8a7ad9e7a631cf89b681e6511a7e76c4.jpg?s=72&d=https%3A%2F%2Fa.slack-edge.com%2Fdf10d%2Fimg%2Favatars%2Fava_0021-72.png)
is there some “escape sequence” for variable values containing valid templating expressions, like:
abc: "{{ template "slack.general.text" . }}"
(in my case this value shouldn’t be rendered, but passed as-is)
![Erik Osterman (Cloud Posse) avatar](https://secure.gravatar.com/avatar/88c480d4f73b813904e00a5695a454cb.jpg?s=72&d=https%3A%2F%2Fa.slack-edge.com%2Fdf10d%2Fimg%2Favatars%2Fava_0023-72.png)
Use gotemplate escaping
![Erik Osterman (Cloud Posse) avatar](https://secure.gravatar.com/avatar/88c480d4f73b813904e00a5695a454cb.jpg?s=72&d=https%3A%2F%2Fa.slack-edge.com%2Fdf10d%2Fimg%2Favatars%2Fava_0023-72.png)
{{{{Blah}}
}}
![Erik Osterman (Cloud Posse) avatar](https://secure.gravatar.com/avatar/88c480d4f73b813904e00a5695a454cb.jpg?s=72&d=https%3A%2F%2Fa.slack-edge.com%2Fdf10d%2Fimg%2Favatars%2Fava_0023-72.png)
I’m using AngularJS as the front-end JS library, with Go templates within Revel framework to to generate the markup on the back-end. But both Go and Angular use {{ and }} for delimiters in their
![starets avatar](https://secure.gravatar.com/avatar/8a7ad9e7a631cf89b681e6511a7e76c4.jpg?s=72&d=https%3A%2F%2Fa.slack-edge.com%2Fdf10d%2Fimg%2Favatars%2Fava_0021-72.png)
oh, that was easier than I thought. Thank you very much, Erik!
I’m using AngularJS as the front-end JS library, with Go templates within Revel framework to to generate the markup on the back-end. But both Go and Angular use {{ and }} for delimiters in their
2019-09-17
![Jakub Korzeniowski avatar](https://secure.gravatar.com/avatar/c35bda0a8d7ce4cd8a5c970f6042b4d2.jpg?s=72&d=https%3A%2F%2Fa.slack-edge.com%2Fdf10d%2Fimg%2Favatars%2Fava_0025-72.png)
Hi All . I want to deploy Atlantis to be able to run helmfile instead of terraform. Using an official helm chart for that (https://www.runatlantis.io/docs/deployment.html#deployment-2). I was wondering whether someone has already built a docker image with helmfile and helm secrets installed that I could simply substitute the official one for.
Atlantis: Terraform Pull Request Automation
![Erik Osterman (Cloud Posse) avatar](https://secure.gravatar.com/avatar/88c480d4f73b813904e00a5695a454cb.jpg?s=72&d=https%3A%2F%2Fa.slack-edge.com%2Fdf10d%2Fimg%2Favatars%2Fava_0023-72.png)
@Jakub Korzeniowski we use atlantis with helmfile
![Erik Osterman (Cloud Posse) avatar](https://secure.gravatar.com/avatar/88c480d4f73b813904e00a5695a454cb.jpg?s=72&d=https%3A%2F%2Fa.slack-edge.com%2Fdf10d%2Fimg%2Favatars%2Fava_0023-72.png)
our strategy is to use geodesic. we bake our cloud automation toolchain into a container
![Erik Osterman (Cloud Posse) avatar](https://secure.gravatar.com/avatar/88c480d4f73b813904e00a5695a454cb.jpg?s=72&d=https%3A%2F%2Fa.slack-edge.com%2Fdf10d%2Fimg%2Favatars%2Fava_0023-72.png)
then we can run that container anywhere (e.g. on our tty or with atlantis)
![Erik Osterman (Cloud Posse) avatar](https://secure.gravatar.com/avatar/88c480d4f73b813904e00a5695a454cb.jpg?s=72&d=https%3A%2F%2Fa.slack-edge.com%2Fdf10d%2Fimg%2Favatars%2Fava_0023-72.png)
Geodesic is a cloud automation shell. It's the fastest way to get up and running with a rock solid, production grade cloud platform built on top of strictly Open Source tools. ★ this repo! h…
2019-09-18
![Asaduzzaman Pavel avatar](https://secure.gravatar.com/avatar/022edea0595deb033f58d4296ca54a75.jpg?s=72&d=https%3A%2F%2Fa.slack-edge.com%2Fdf10d%2Fimg%2Favatars%2Fava_0026-72.png)
hello
![Asaduzzaman Pavel avatar](https://secure.gravatar.com/avatar/022edea0595deb033f58d4296ca54a75.jpg?s=72&d=https%3A%2F%2Fa.slack-edge.com%2Fdf10d%2Fimg%2Favatars%2Fava_0026-72.png)
how do i add file to files to configmaps?
![Asaduzzaman Pavel avatar](https://secure.gravatar.com/avatar/022edea0595deb033f58d4296ca54a75.jpg?s=72&d=https%3A%2F%2Fa.slack-edge.com%2Fdf10d%2Fimg%2Favatars%2Fava_0026-72.png)
helmfile -f ../deployments/helmfile.yaml sync
could not deduce `environment:` block, configuring only .Environment.Name. error: failed to read helmfile.yaml.part.0: reading document at index 1: yaml: unmarshal errors:
line 2: cannot unmarshal !!str `./depen...` into state.ReleaseSpec
line 3: cannot unmarshal !!str `./depen...` into state.ReleaseSpec
line 4: cannot unmarshal !!str `./servi...` into state.ReleaseSpec
in ../deployments/helmfile.yaml: failed to read helmfile.yaml: reading document at index 1: yaml: unmarshal errors:
line 2: cannot unmarshal !!str `./depen...` into state.ReleaseSpec
line 3: cannot unmarshal !!str `./depen...` into state.ReleaseSpec
line 4: cannot unmarshal !!str `./servi...` into state.ReleaseSpec
Error: running "helmfile -f ../deployments/helmfile.yaml sync" failed with exit code 1
![starets avatar](https://secure.gravatar.com/avatar/8a7ad9e7a631cf89b681e6511a7e76c4.jpg?s=72&d=https%3A%2F%2Fa.slack-edge.com%2Fdf10d%2Fimg%2Favatars%2Fava_0021-72.png)
might you pls show what’s inside your helmfile?
![mumoshu avatar](https://secure.gravatar.com/avatar/8e045bf747ca7a90b1d955dc30217271.jpg?s=72&d=https%3A%2F%2Fa.slack-edge.com%2Fdf10d%2Fimg%2Favatars%2Fava_0015-72.png)
@Asaduzzaman Pavel Hey! As @starets asked, would you mind sharing your helmfile.yam? Those errors seem to indicate that you have a bunch of syntax errors in your helmfile.yaml.
Generally speaking, you can use idioms like
releases:
- name: yourapp
set:
- name: key1
file: path/to/file
and/or {{ readFile "path/to/file" | indent ... }}
![Asaduzzaman Pavel avatar](https://secure.gravatar.com/avatar/022edea0595deb033f58d4296ca54a75.jpg?s=72&d=https%3A%2F%2Fa.slack-edge.com%2Fdf10d%2Fimg%2Favatars%2Fava_0026-72.png)
any idea whats going on?
2019-09-19
![Volodymyr Barna avatar](https://secure.gravatar.com/avatar/bca8a996db42ce0ccc829335057ef6ba.jpg?s=72&d=https%3A%2F%2Fa.slack-edge.com%2Fdf10d%2Fimg%2Favatars%2Fava_0024-72.png)
wow, there’s a chat for helmfile, awesome! But unfortunately, I already created an issue for my question. Any ~helm~elp is appreciated! (can’t find anything in docs and in other issues) https://github.com/roboll/helmfile/issues/867
Suppose I have a helmfile.yaml with helmDefaults and helmfiles with a list of files. How do I propagate values from helmDefaults to these child helmfiles? I know if I'd used releases instead of…
![yuri avatar](https://secure.gravatar.com/avatar/3c24de31230434f6a16844f2b9af7dbe.jpg?s=72&d=https%3A%2F%2Fa.slack-edge.com%2Fdf10d%2Fimg%2Favatars%2Fava_0015-72.png)
hey guys, can i reference Release.Name in values? for example, i deploy a db that creates an svc, and i need this db-svc to be referenced in another app values
![mumoshu avatar](https://secure.gravatar.com/avatar/8e045bf747ca7a90b1d955dc30217271.jpg?s=72&d=https%3A%2F%2Fa.slack-edge.com%2Fdf10d%2Fimg%2Favatars%2Fava_0015-72.png)
@yuri Hey! So you wanna refer to the db release’s name from the app release, right? If so, unfortunately it isn’t possible.
How about just using a template variable though?
{{ $db_release := "mydb" }}
releases:
- name: {{ $db_release}}
chart: charts/db
- name: app
chart: charts/app
values:
- db:
host: {{ $db_release }}:3306
![yuri avatar](https://secure.gravatar.com/avatar/3c24de31230434f6a16844f2b9af7dbe.jpg?s=72&d=https%3A%2F%2Fa.slack-edge.com%2Fdf10d%2Fimg%2Favatars%2Fava_0015-72.png)
@mumoshu thanks! not bad at all it can work for me
2019-09-20
2019-09-21
![yuri avatar](https://secure.gravatar.com/avatar/3c24de31230434f6a16844f2b9af7dbe.jpg?s=72&d=https%3A%2F%2Fa.slack-edge.com%2Fdf10d%2Fimg%2Favatars%2Fava_0015-72.png)
based on that feature: https://github.com/roboll/helmfile/pull/439 i was assuming that i can use this:
releases:
- name: "appv1"
chart: private/appv1
<<: *default
values:
- fullnameOverride: "{{`{{ .Release.Name }}`}}"
template is passing fine, but sync results in:
List of releases in error :
RELEASE
appv1
err: release "appv1" in "app.yaml" failed: failed processing release appv1: helm exited with status 1:
Error: release: "appv1" not found
in ./helmfile.yaml: in .helmfiles[0]: in apps/app.yaml: failed processing release appv1: helm exited with status 1: Error: release: “appv1” not found ```
if im just using - fullnameOverride: "appv1"
it works just fine
This feature is supposed to help advanced use-cases like Conventional Directory Structure explained in several issues like #428. Newly added configuration keys templates, missingFileHandler, and th…
![mumoshu avatar](https://secure.gravatar.com/avatar/8e045bf747ca7a90b1d955dc30217271.jpg?s=72&d=https%3A%2F%2Fa.slack-edge.com%2Fdf10d%2Fimg%2Favatars%2Fava_0015-72.png)
@yuri Thanks! Looks like it should just work.
I’m curious, but which version of helmfile are you running, and could you share logs from helmfile --log-level=debug -f yourhelmfile.yaml <CMD>
so that you can see the intermediate result of rendered helmfile.yaml that helps debugging?
This feature is supposed to help advanced use-cases like Conventional Directory Structure explained in several issues like #428. Newly added configuration keys templates, missingFileHandler, and th…
2019-09-22
![mumoshu avatar](https://secure.gravatar.com/avatar/8e045bf747ca7a90b1d955dc30217271.jpg?s=72&d=https%3A%2F%2Fa.slack-edge.com%2Fdf10d%2Fimg%2Favatars%2Fava_0015-72.png)
Trying CUE as an alternative to go YAML+Go templates:
I got to know about the CUE language which is similar to Jsonnet at glance but based on somewhat different theory and goal. CUE provides you a typed, structured template that can be used in various…
2019-09-25
![Volodymyr Barna avatar](https://secure.gravatar.com/avatar/bca8a996db42ce0ccc829335057ef6ba.jpg?s=72&d=https%3A%2F%2Fa.slack-edge.com%2Fdf10d%2Fimg%2Favatars%2Fava_0024-72.png)
Hello. I recreated kubernetes cluster (everything is deleted) but when I run helmfile list
on a newly created cluster it still shows a list of relases with installed:true. Where’s helmfile state is saved? I even removed ~/.helm
folder and run helmfile destroy
. It didn’t help. Thanks!
![mumoshu avatar](https://secure.gravatar.com/avatar/8e045bf747ca7a90b1d955dc30217271.jpg?s=72&d=https%3A%2F%2Fa.slack-edge.com%2Fdf10d%2Fimg%2Favatars%2Fava_0015-72.png)
Ah
![mumoshu avatar](https://secure.gravatar.com/avatar/8e045bf747ca7a90b1d955dc30217271.jpg?s=72&d=https%3A%2F%2Fa.slack-edge.com%2Fdf10d%2Fimg%2Favatars%2Fava_0015-72.png)
helmfile list
works locally and is still useful to see the list of releases being installed BEFORE actually installing them.
But I’d say is IS confusing in contrast to helm list
.
![mumoshu avatar](https://secure.gravatar.com/avatar/8e045bf747ca7a90b1d955dc30217271.jpg?s=72&d=https%3A%2F%2Fa.slack-edge.com%2Fdf10d%2Fimg%2Favatars%2Fava_0015-72.png)
helmfile itself doesn’t store anything in cluster. all it depends are helm releases in cluster and local files
![mumoshu avatar](https://secure.gravatar.com/avatar/8e045bf747ca7a90b1d955dc30217271.jpg?s=72&d=https%3A%2F%2Fa.slack-edge.com%2Fdf10d%2Fimg%2Favatars%2Fava_0015-72.png)
I’d like to improve the situation somehow.
Should we change helmfile to use helmfile list --local
for the current behavior - list releases managed by helmfile, and use helmfile list
for running helm list
for each managed release to augment the result with info like REVISION
UPDATED
STATUS
etc?
![mumoshu avatar](https://secure.gravatar.com/avatar/8e045bf747ca7a90b1d955dc30217271.jpg?s=72&d=https%3A%2F%2Fa.slack-edge.com%2Fdf10d%2Fimg%2Favatars%2Fava_0015-72.png)
@Volodymyr Barna Would you agree with the change proposed above?
![Volodymyr Barna avatar](https://secure.gravatar.com/avatar/bca8a996db42ce0ccc829335057ef6ba.jpg?s=72&d=https%3A%2F%2Fa.slack-edge.com%2Fdf10d%2Fimg%2Favatars%2Fava_0024-72.png)
![Volodymyr Barna avatar](https://secure.gravatar.com/avatar/bca8a996db42ce0ccc829335057ef6ba.jpg?s=72&d=https%3A%2F%2Fa.slack-edge.com%2Fdf10d%2Fimg%2Favatars%2Fava_0024-72.png)
On the new cluster I want to run in tillerless mode. I followed the docs but it says tiller not found
when I run helmfile apply
. Or when I run helmfile status
it says release: "blah" not found
. So I guess it has something to do with the state saved locally.
![Volodymyr Barna avatar](https://secure.gravatar.com/avatar/bca8a996db42ce0ccc829335057ef6ba.jpg?s=72&d=https%3A%2F%2Fa.slack-edge.com%2Fdf10d%2Fimg%2Favatars%2Fava_0024-72.png)
wow! it when I do tillerless: true
on the release itself it works! but not if I do it in helmDefaults
, why? I have a dozen of releases I want to keep it DRY
![Volodymyr Barna avatar](https://secure.gravatar.com/avatar/bca8a996db42ce0ccc829335057ef6ba.jpg?s=72&d=https%3A%2F%2Fa.slack-edge.com%2Fdf10d%2Fimg%2Favatars%2Fava_0024-72.png)
btw releases and helmDefaults are separated by ---
Because I need to use template values
![Volodymyr Barna avatar](https://secure.gravatar.com/avatar/bca8a996db42ce0ccc829335057ef6ba.jpg?s=72&d=https%3A%2F%2Fa.slack-edge.com%2Fdf10d%2Fimg%2Favatars%2Fava_0024-72.png)
so much magic is going on
![Volodymyr Barna avatar](https://secure.gravatar.com/avatar/bca8a996db42ce0ccc829335057ef6ba.jpg?s=72&d=https%3A%2F%2Fa.slack-edge.com%2Fdf10d%2Fimg%2Favatars%2Fava_0024-72.png)
but other values (like kubeContext) are propagated to each and every release. Can I somehow generate output template and see what goes where?
![mumoshu avatar](https://secure.gravatar.com/avatar/8e045bf747ca7a90b1d955dc30217271.jpg?s=72&d=https%3A%2F%2Fa.slack-edge.com%2Fdf10d%2Fimg%2Favatars%2Fava_0015-72.png)
@Volodymyr Barna Hmmm, this sounds like a bug that is preventing helmDefaults.tillerless
to releases
somehow(it should!)
I’ll take a look asap. Thx for reporting
![mumoshu avatar](https://secure.gravatar.com/avatar/8e045bf747ca7a90b1d955dc30217271.jpg?s=72&d=https%3A%2F%2Fa.slack-edge.com%2Fdf10d%2Fimg%2Favatars%2Fava_0015-72.png)
Issue opened: https://github.com/roboll/helmfile/issues/875
Per https://sweetops.slack.com/archives/CE5NGCB9Q/p1569425828026200 Is this a bug? Needs investigation.
![Volodymyr Barna avatar](https://secure.gravatar.com/avatar/bca8a996db42ce0ccc829335057ef6ba.jpg?s=72&d=https%3A%2F%2Fa.slack-edge.com%2Fdf10d%2Fimg%2Favatars%2Fava_0024-72.png)
maybe other values (like force, atomic) are not inhereted as well. I dunno how to check. I would be great if helmfile build
would show everything that has been inhereted. And maybe add --with-default
option which would also show the output file with all the possible parameters, including defaults
![Volodymyr Barna avatar](https://secure.gravatar.com/avatar/bca8a996db42ce0ccc829335057ef6ba.jpg?s=72&d=https%3A%2F%2Fa.slack-edge.com%2Fdf10d%2Fimg%2Favatars%2Fava_0024-72.png)
I wrote a reply, seems to be my issue, but stiil, I don’t know how to debug and any helm would be much appreciated
![Andrew Nazarov avatar](https://avatars.slack-edge.com/2021-06-09/2146832855878_fbb84e3b2832cc494a93_72.jpg)
Once I had a feeling that some defaults were not taken into the consideration. But tillerless: true
has been working for me like a charm. I don’t have ---
between defaults and releases though. And I’m using pretty old helmfile version right now.
![Nullck avatar](https://secure.gravatar.com/avatar/e9e80b223bca9017555cdef36a3eec27.jpg?s=72&d=https%3A%2F%2Fa.slack-edge.com%2Fdf10d%2Fimg%2Favatars%2Fava_0014-72.png)
here in my case I have multiples helmfiles.yaml in order to use include flag, something like it:
ydf-stack on feature/cloudability» tree clusters [20:14:58]
clusters
├── americas
│ └── helmfile.yaml
├── apac
│ └── helmfile.yaml
├── commonHelmfile.yaml
├── emea
│ └── helmfile.yaml
I must to declare
helmDefaults:
tillerNamespace: helm-revisions #dedicated default key for tiller-namespace
tillerless: true
force: true
for each one of these files, would be great to declare in just the root files. americas/helmfile.yaml has an include to commonHelmfile.yaml.
helmfiles:
- path: ../commonHelmfile.yaml
![Nullck avatar](https://secure.gravatar.com/avatar/e9e80b223bca9017555cdef36a3eec27.jpg?s=72&d=https%3A%2F%2Fa.slack-edge.com%2Fdf10d%2Fimg%2Favatars%2Fava_0014-72.png)
I don’t if we’re talking about the same problem, if not sorry
![aaronbatilo avatar](https://secure.gravatar.com/avatar/5388a98c6a5792e5d47adef5f1be0ea1.jpg?s=72&d=https%3A%2F%2Fa.slack-edge.com%2Fdf10d%2Fimg%2Favatars%2Fava_0000-72.png)
Has anyone had success with generating a lock file for your helmfile?
root@d8760d0f2279:~/src/helmfiles/aws/us-west-2/l2v-dev# ls
helmfile.yaml
root@d8760d0f2279:~/src/helmfiles/aws/us-west-2/l2v-dev# cat helmfile.yaml
releases:
- name: metrics-server
chart: stable/metrics-server
root@d8760d0f2279:~/src/helmfiles/aws/us-west-2/l2v-dev# helmfile deps
root@d8760d0f2279:~/src/helmfiles/aws/us-west-2/l2v-dev# ls
helmfile.yaml
root@d8760d0f2279:~/src/helmfiles/aws/us-west-2/l2v-dev# helmfile -v
helmfile version v0.85.2
No matter what I do, I can’t seem to create that lock file
![aaronbatilo avatar](https://secure.gravatar.com/avatar/5388a98c6a5792e5d47adef5f1be0ea1.jpg?s=72&d=https%3A%2F%2Fa.slack-edge.com%2Fdf10d%2Fimg%2Favatars%2Fava_0000-72.png)
Nevermind. I needed an explicit repositories
block
![mumoshu avatar](https://secure.gravatar.com/avatar/8e045bf747ca7a90b1d955dc30217271.jpg?s=72&d=https%3A%2F%2Fa.slack-edge.com%2Fdf10d%2Fimg%2Favatars%2Fava_0015-72.png)
@aaronbatilo Thanks for sharing your finding!
That makes sense from the implementor’s perspective, but sounds a bit confusing from a users perspective
Any idea to improve it? Should helmfile fail if helmfile deps
are run on a helmfile.yaml without the repositories
block?
![aaronbatilo avatar](https://secure.gravatar.com/avatar/5388a98c6a5792e5d47adef5f1be0ea1.jpg?s=72&d=https%3A%2F%2Fa.slack-edge.com%2Fdf10d%2Fimg%2Favatars%2Fava_0000-72.png)
Omg it’s mumoshu. Big fan, big fan. I think that does should fail. It was unintuitive for me to see an exit code of 0 but nothing was happening
![mumoshu avatar](https://secure.gravatar.com/avatar/8e045bf747ca7a90b1d955dc30217271.jpg?s=72&d=https%3A%2F%2Fa.slack-edge.com%2Fdf10d%2Fimg%2Favatars%2Fava_0015-72.png)
Thx for confirming!
Issue opened https://github.com/roboll/helmfile/issues/878
As discussed in https://sweetops.slack.com/archives/CE5NGCB9Q/p1569439225028200 To not break users depend on the existing behavior, I'd add also some command-line flag to turn the existing beha…
![mumoshu avatar](https://secure.gravatar.com/avatar/8e045bf747ca7a90b1d955dc30217271.jpg?s=72&d=https%3A%2F%2Fa.slack-edge.com%2Fdf10d%2Fimg%2Favatars%2Fava_0015-72.png)
Perhaps another way would be to change Helmfile just emit some warning message to help you notice that you missed repositories
block. Thoughts?
![mumoshu avatar](https://secure.gravatar.com/avatar/8e045bf747ca7a90b1d955dc30217271.jpg?s=72&d=https%3A%2F%2Fa.slack-edge.com%2Fdf10d%2Fimg%2Favatars%2Fava_0015-72.png)
Pls feel free to reply here or in the issue
![aaronbatilo avatar](https://secure.gravatar.com/avatar/5388a98c6a5792e5d47adef5f1be0ea1.jpg?s=72&d=https%3A%2F%2Fa.slack-edge.com%2Fdf10d%2Fimg%2Favatars%2Fava_0000-72.png)
What kind of message do you imagine would be in the warning?
![aaronbatilo avatar](https://secure.gravatar.com/avatar/5388a98c6a5792e5d47adef5f1be0ea1.jpg?s=72&d=https%3A%2F%2Fa.slack-edge.com%2Fdf10d%2Fimg%2Favatars%2Fava_0000-72.png)
Oh, I see you left a message in the issue
![mumoshu avatar](https://secure.gravatar.com/avatar/8e045bf747ca7a90b1d955dc30217271.jpg?s=72&d=https%3A%2F%2Fa.slack-edge.com%2Fdf10d%2Fimg%2Favatars%2Fava_0015-72.png)
something like
Unable to update chart dependencies due to that no `repositories` defined in your helmfile.yaml
Nothing to update. Did you miss `repositories` in your helmfile.yaml? See <https://github.com/roboll/helmfile/issues/878>
No repositories managed hence nothing to be updated by Helmfile. Did you miss repositories block in your helmfile.yaml?