#helmfile

Questions and discussion around helmfile https://github.com/roboll/helmfile and https://github.com/cloudposse/helmfiles Archive: https://archive.sweetops.com/helmfile/

2019-11-18

2019-11-15

Shikhar Goel

Hi…i am not able to run helmfile using helm 3…i am getting the following error….. Error: context deadline exceeded Error: plugin "diff" exited with error

mumoshu

Which version of helmfile are u using?

mumoshu

Do you have tillerless: true set?

mumoshu

You need to turn it off

Shikhar Goel

Thanks it worked with removing tiller plugin from dockerfile

2019-11-13

Thomas Burton

Anyone able to help here

After running helmfile --environment staging apply successfully I go to check my releases and they’re not listed even though part of the logs suggests otherwise.

Thomas Burton

This is the output from the logs

Thomas Burton

I am running a tiller deployment in the staging namespace

Thomas Burton

However, if I run helm list --tiller-namespace staging it returns absolutely nothing

Thomas Burton

Another weird thing is that the pods start correctly

Thomas Burton
Andrey Nazarov

What’s in helmDefaults.tillerNamespace in your helmfile.yaml?

Thomas Burton

@Andrey Nazarov it was originally default. Changed it to {{ .Environment.Name }} but still no luck.

Andrey Nazarov

oh, you are using tillerless plugin)

Andrey Nazarov

Then try helm tiller run staging -- helm ls

Thomas Burton

A-HA!

Thomas Burton

Thanks v much

Thomas Burton

Worked

Erik Osterman
helm/helm

The Kubernetes Package Manager. Contribute to helm/helm development by creating an account on GitHub.

Erik Osterman

3.0 official!!l?

seems official, whats the support status of helmfile with helm v3? sorry was not following lately

I’ve been using v3 for the last month

Erik Osterman

With Helmfile?

Erik Osterman

I know there have been a few PRs to add support

Erik Osterman

Haven’t tested it yet

Yeah with helmfile

4
Erik Osterman

@Daren @chris FYI

1
chris
10:15:37 PM

@chris has joined the channel

Something I just thought of…the first time I had to set an env variables…butbinhavent been doing that

2019-11-12

Thomas Burton

Afternoon. Question:

Thomas Burton

I am running into an error with installing any charts through helmfile. I get the following error:

sung kang

That’s an underlying helm issue

sung kang

Happens when you fail the first release

Andrey Nazarov

indeed

Andrey Nazarov

atomic: true could help here

Thomas Burton

thanks for your responses

Thomas Burton
Thomas Burton

This is my helmfile

Thomas Burton
Thomas Burton

any help would be greatly appreciated

Thomas Burton

managed to fix by running helmfile destroy then helmfile apply

mumoshu

I periodically see folks being trapped by the fact that atomic isnt enabled by default. Hopefully we are able to cut v1 and start turning it on by default since then https://github.com/roboll/helmfile/issues/776

plan: Helmfile v1 · Issue #776 · roboll/helmfile

Helmfile v1 may be the first helmfile release may introduce small backward-incompatible changes to provide long-term benefit for users. It won't break anything badly as Helmfile is already adop…

mumoshu

@Erik Osterman I’d appreciate your comment here! https://github.com/roboll/helmfile/issues/932#issuecomment-553188582

feat: Predictable Helmfile template · Issue #932 · roboll/helmfile

TL;DR; I want to add a new helmfile.yaml field to make templating helmfile configs easier. Problem Helmfile's double-rendering has opened a wide variety of use-cases that requires you to write …

2019-11-11

Any way to run helmfile hooks without helmfile sync?

(am investigating using our helmfile setup with our argocd deployment…but I made extensive use of helmfile hooks)

mumoshu

@ Unfortunately it isn’t possible today. But a feature request is welcomed. If you could also include your specific use-cases for hooks(fetching charts and modifying it, creating namespaces by calling kubectl, etc) that would be great

Sure- helmfile is golang?

mumoshu

Yep

Probably not gonna be a PR then :)

I’ll put in an issue though

mumoshu

Thanks!

2019-11-10

Andrey Nazarov

Is it possible to prevent a release from updating when doing helmfile apply? I don’t see any flag allowing me to do so. The use case: some charts have some random values which are recalculated every time we run helm diff. So there are always some diffs. Hence this leads to unnecessary upgrades. This ignore is not the best solution for sure. Like it will also ignore all “positive changes” that should be syncronized. But at the moment I don’t see anything else that could have been done to solve this. Any thoughts on this?

Andrey Nazarov

No, it was a bad idea. It’s better to upgrade a release every time.

What are the random numbers for? I generate secrets- but i use hooks so that I only generate them if they don’t already exist. If you’re generating random values in manifests that you apply, then you are certainly changing stuff.

Andrey Nazarov

Usually this comes from certs, like tls.crt, tls.key, caBundle, etc fields. Artifactory and Stash charts are know for doing that. Also I’ve seen something similar from Elasticsearch, but not anymore. Cannot find any examples with generated strings and random numbers right now, but they definitely existed before).

2019-11-09

Erik Osterman

Wow Helmfile getting spammed in issues! Hope this is an isolated incident. GitHub has been amazingly spam free.

1
1
mumoshu

just finished reporting those all

1
1

2019-11-07

Gourav

Hello All.. Is there any document/image which depicts the kiam, reloader and cert-manager? Which tries to show how they are interrelated. If anyone is having such link, can you please share with me?

Erik Osterman

Nothing visual

Erik Osterman

we have our implementation of them here: https://github.com/cloudposse/helmfiles/tree/master/releases

cloudposse/helmfiles

Comprehensive Distribution of Helmfiles. Works with helmfile.d - cloudposse/helmfiles

Erik Osterman

kiam is to obtain IAM roles needed by cert-manager for Let’s Encrypt validation for wildcard domains

Erik Osterman

cert-manager is needed for the PKI certs that kiam uses between agents/servers

Erik Osterman

reloader is needed to restart the pods for kiam when the certificates change (or else you have a forced outage)

Gourav

@Erik Osterman Thank you very much

Frank

Hi all! I have some helm charts that have to be installed in the right order, e.g. 1) install helm chart 1 which created some CRDs and so on 2) wait some time until helm chart 1 is settled 3) install helm chart 2

Pierre Humberdroz

https://github.com/helm-notifier/Kubernetes-Infrastructure

Check the helmfile.d they get executed in alphabetical order

helm-notifier/Kubernetes-Infrastructure

Contribute to helm-notifier/Kubernetes-Infrastructure development by creating an account on GitHub.

Frank

I work with references from one (master) helmfile to (child) helmfiles. like this I think the order is also preserved plus additionally I can use common values and so on. But what doesn’t work is this wait time…

Frank

e.g.

bases:
  - common.yaml
---
helmfiles:
  - path: "storageclass.yaml"
  - path: "reloader.yaml"
  - path: "certmanager.yaml"
#  - path: "appscode.yaml"
  - path: "others.yaml"
    values:
    - environment: {{ .Values.environment }}  
    - domain: {{ .Values.domain }} 
Frank

I tried to do this with wait(on helmfile and release level) and atomic , but both seem not to work stable in my case. (By the way I use helm3 , latest release, that might be important )

mumoshu

what is your definition of the chart is settled?

I thought wait: true i.e. helm’s --wait, more or less, wait for all the pods under deployments are ready in terms of pod readiness.

is that what you want? or perhaps you have an another criteria to be met before helmfile proceeds to the next release?

2019-11-05

Another question- how does values templating work in helmfile? Like, I can’t use .Values from a helmfile in .gotmpl files…but I can use values passed in from higher level helmfiles using the ‘helmfiles’ key. Butniflt feels like there is a way I’m missing to not need multiple layers. The kinds of things I want to do are declare a value in one place, and then use that value later in to build up other values.

Like ‘tag: 123’ and then ‘image: tag: {{.Values.tag}}’

Hmm, and it looks like I can also you values from the environment. Interestingly, env variables override values passed in

mumoshu

Hey!
I can’t use .Values from a helmfile in .gotmpl files.

I thought this is actually opposite. You can access .Values from within .gomtpl files listed under releases[].values[]

mumoshu

But I’d say it’s the only exception

mumoshu

To pass .Values down to sub-helmfiles, you need to explicitly state so in helmfiles[].values

mumoshu


it looks like I can also you values from the environment. Interestingly, env variables override values passed in

I don’t understand this. Would you mind providing an example?

mumoshu

helmfile doesn’t override values with env variables except that you explicitly stated so

2019-11-04

Bart M.

hmm getOrNil can only return as string?

mumoshu

nope. what do you see though?

Bart M.

well I’m trying to loop over a dict that might not exist…

Bart M.

so I’m trying to do something like this:

{{ range $version, $semver := (getOrNil .Values.deploys "somerelease") \| default {} }}
Bart M.

the \| default {} doesn’t seem to work, so I left it out

Bart M.

but then I get: wrong type for value: expected string, got map[string]interface{}

Bart M.

on that line

Bart M.

core reason for this is that we need to deploy the same stack to quite a few namespaces, all different versions, so now we have a central base that includes a deploys map like this:

deploys:
  service1:
    v0: ">=0.0.1-alpha.1"
    v1: "1.0.2"
  service2:
    v2: "2.0.0"

The file containing this is loaded depending on the environment that’s being deployed

mumoshu

@Bart M. It should be getOrNil "somerelease" .Values.deploys

Bart M.

ow

Bart M.

right damn

mumoshu

and {} isnt a valid symbol in go template so probably you want (getOrNil "somerelease" .Values.deploys) \| default (dict) or even shorter get "somerelease" .Values.deploys (dict)

Bart M.

hmm ic

Bart M.

allright - thanks, seems to work like that

mumoshu

awesome!

2019-11-02

mumoshu

I’d like to deprecate “double-rendering” in favor of this feature: https://github.com/roboll/helmfile/issues/932

WDYT?

feat: Double-render-free Helmfile config template · Issue #932 · roboll/helmfile

TL;DR; I want to add a new helmfile.yaml field to make templating helmfile configs easier and more powerful than ever. Problem Helmfile's double-rendering has opened a wide variety of use-cases…

2019-11-01

    keyboard_arrow_up