#helmfile - June 2020

Joe Hohertz
Joe Hohertzover 6 years ago
Hello, I am trying to see if I can get helmfile to do some things for me... seem to be having some basic issues, perhaps my understanding of the tool is not correct? On the most basic level... if I pass a yaml file with foo: bar to --values flag on helmfile, I should be able to see .Values.foo in the helmfile context, yes? (I never see any of the data passed via --values)
Zachary Loeber
Zachary Loeberover 6 years ago
My helmfile stitching framework is becoming a bit of a monster but after doing some tinkering with it the other day it now is a monster that works on Macs (with docker) as well: https://github.com/zloeber/CICDHelper
jqjq
jqjqover 6 years ago
Any chance I can get someone to look at my helmfile PR? https://github.com/roboll/helmfile/pull/1296
Thanks!
Craig Dunford
Craig Dunfordover 6 years ago
anyone know if helmfile populates a value containing the full path of the current file during the first pass rendering? I am trying to use exec to call a script from an environment file that is included by multiple different helmfiles; any paths I use seem to be relative to the original helmfile
Zachary Loeber
Zachary Loeberover 6 years ago
I just put together a proof of concept for bundling up helmfile charts in a docker image which then gets run inside the cluster to bootstrap all the base services, https://github.com/zloeber/CICDHelper (see example 3). While I'm not 100% certain how useful this is, I'm still happy at how well it works 🙂 Dang helmfile is so cool...
bradym
bradymover 6 years ago(edited)
I'm still having a difficult time understanding what values are available where when using helmfile. Does anyone know of somewhere that is documented? (issue? code?)

An example of something stumping me today:

# helmfile.yaml

releases:
  - name: foo
    values:
      - values-apps/foo.values.yaml.gotmpl
    valuesTemplate:
      - service:
          port: <ref+awsssm://foo/stage/CONTAINER_PORT?region=us-west-1>

---
# values-apps/foo.values.yaml.gotmpl

deployment:
  readinessProbe:
    exec:
      command:
        - "/bin/bash"
        - "/app/health.sh"
        - "localhost"
        - "{{ .Values.service.port }}"
        - ".1s"

I'm getting an error that .service.port is not in .Values. When I echo out {{ . }} in foo.values.yaml.gotmpl, the only values I can get to show up are ones that are passed in via the --state-values-set flag. I've been unable to get anything in helmfile.yaml to be available there. Could someone point me in the right direction?
Zachary Loeber
Zachary Loeberover 6 years ago
There is a section in the documentation titled, 'Running Helmfile without an Internet connection'. It references using the depreciated charts action as being a solution to pre-download the charts. Firstly, I think that this maybe should be updated to be sync --skip-deps , Before putting in the PR to reflect this change I'd like to be certain my understanding is correct. Secondly, wouldn't this only download the chart index files and references and not actually download the charts themselves?
jason witkowski
jason witkowskiover 6 years ago
Hey guys, I'm having an issue getting helmfile to do anything with repositories unless I list the repositories way down the chain of helmfile includes
voron
voronover 6 years ago
What's the best way to share release templates between multiple helmfiles ? bases produces yaml: unknown anchor referenced , readFile produces cannot unmarshal !!map into string, the only working option I've found is {{- tpl (readFile "../common/templates.yaml") . | nindent 0 }} , but it doesn't have access neither to environment variables nor to yaml multipart variables inside tempalte.
Wanderley Teixeira
Wanderley Teixeiraover 6 years ago(edited)
I have a Git repo where all my charts live in separate folders. In Helmfile, I have all apps listed with their name/url for each application, for example,
repositories:  - name: app1
    url: <git+ssh://git@bitbucket.org/examplecom/helm-charts@app1?ref={{> .Values | getOrNil "app1._version" | default "master" }}&sparse=0
  - name: app2
    url: <git+ssh://git@bitbucket.org/examplecom/helm-charts@app2?ref=>{{ .Values | getOrNil "app2._version" | default "master" }}&sparse=0
  ...

Every time i do a helmfile diff or apply it adds each and every repo. It is slow.

$ helmfile --environment=dev --namespace=default --selector name=app1 apply
Adding repo app1 <git+ssh://git@bitbucket.org/examplecom/helm-charts@app1?ref=v0.1.2&sparse=0>
"app1" has been added to your repositories

Adding repo app2 <git+ssh://git@bitbucket.org/examplecom/helm-charts@app2?ref=v0.1.2&sparse=0>
"app2" has been added to your repositories
...

I was wondering if there is a quicker way to update only 1 app and at times all apps or even a list of apps. How are you using Helmfile + helm-git ?
Balazs Varga
Balazs Vargaover 6 years ago
hello guys.

what does this (<<) mean in hemfile ?
peterloron
peterloronover 6 years ago
Hello, all. Is it possible to inject new yaml into a chart using helmfile? I have an upstream chart I’m trying to use, but I need to create a Traefik ingressroute, which the chart does not support. Is there a way for me to inject the helm template for the ingressroute into the chart dynamically? I’d rather not fork the upstream chart if I can avoid it. Thanks.
Mr.OO
Mr.OOover 6 years ago
Hi,
I want the functionality of requiredEnv , but I want a default value if the os environment variable is missing.
How could I acheive that?
shamil.kashmeri
shamil.kashmeriover 6 years ago
hi all! had a question, i am separating in to sub helmfiles, i added selectors: to the main helmfile.yaml like so:
helmfiles:
- path: ./helmfiles/app1.yaml
  selectors:
  - name=app1
- path: ./helmfiles/app2.yaml
  selectors:
  - name=app2

but when i run helmfile --selector name=app1 diff it still runs through both subhelmfiles am I missing something? Im using latest helmfile with helm 3
peterloron
peterloronover 6 years ago
When running a command triggered by a hook, is there a variable I can use which holds the path to the temporary cached chart that helmfile downladed?
TBeijen
TBeijenover 6 years ago
I assume there isn't a toggle in helmDefaults that's equivalent to the cli switch --skip-deps , is there?
muhaha
muhahaover 6 years ago
Guys ? Is https://github.com/mumoshu/terraform-provider-helmfile masking Kind: Secret in TF diff ?
muhaha
muhahaover 6 years ago(edited)
Is possible to install helm release from git source ? ( https://github.com/opendistro-for-elasticsearch/opendistro-build/tree/master/helm/opendistro-es ), it has no public helm chart available btw
Vasco
Vascoover 6 years ago
Hi! Can I override the chart's dependencies versions via helmfile? For example, say that my chart is dependencies are (Chart.yaml)
dependencies:
  - name: sub-chart-A
    version: ~1.1
  - name: sub-chart-B
    version: ~2.1

But now I want define a release that uses sub-chart-B version 2.0.0, is it possible?
Balazs Varga
Balazs Vargaover 6 years ago
hello all. WE use kiali operator and few other helm chart that on cleanup leave some files in cluster. Can I somehow delete with helmfile? postdelete e.g ? Like events?
Kenny Younger
Kenny Youngerover 6 years ago
Has anyone been able to use the jsonPatches or strategicMergePatches successfully? It really seems to throw off the rendering of my chart (produces output that should be disabled).
jason witkowski
jason witkowskiover 6 years ago(edited)
Hey All, Does anyone know if its at all possible to push variables through an exec input list? For example something like:
{{ exec "./mycmd" (list "{{ .Values.region }}" "arg2" "--flag1") | indent 2 }}

I've tried a bunch of different methods to attempt and get it to interpolate, but none successful. also not finding any examples of anyone doing this
Vasco
Vascoover 6 years ago
Hello all, shouldn’t I be able to propagate env values from parent helmfile to child-helmfiles?

parent
environments:
  dev:
    values:
    - myChartVer: 1.0.0-dev

helmfiles:
  - ./mysub1/helmfile.yaml

child: (“./mysub1/helmfile.yaml”)
releases:
    chart: mysubchart
    version: {{ .Values.myChartVer }}

yet trying to to sync this ends in error:
helmfile.yaml.part.0 parsing: template: stringTemplate:6:23: executing "stringTemplate" at <.Values.myChartVer>: map has no entry for key "myChartVer"
Vasco
Vascoover 6 years ago
Is there a way to use a part of value file for a release? I have an umbrella chart setup with value file (values.yaml) like:
subchart1:
  fullnameOverride: myapp-A
  version: 1.2.3
  image:
    pullPolicy: Always
  service:
    type: NodePort

subchart2:
  fullnameOverride: myapp-B
  image:
    pullPolicy: Always
  service:
    type: LoadBalancer

but how can I reference subchart1 values in helmfile without typing them out individually?
releases:
  - name:"my-app-A"
    version: {{ Environment.Values.version }} #works!
    values:
      - values.yaml #how do I limit to just subchart1?