#helmfile (2021-12)

https://github.com/helmfile/helmfile

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

Archive: https://archive.sweetops.com/helmfile/

2021-12-07

Stefan Gluszek avatar
Stefan Gluszek

Hi, I am new to this channel and have a quick questions: Can the environment values be passed to my helm charts?

Evan Pitstick avatar
Evan Pitstick

I’m pretty new too so maybe someone will come along and have better answers for you. Values from the environments section can be passed to the release and OS env values can be used in template as well. I’ve had a hard time getting values from environments into inline values but works like expected for *.yaml.gotmpl files

Andrew Nazarov avatar
Andrew Nazarov

It’s more or less well-defined in docs: https://github.com/roboll/helmfile#environment-values

If it’s not what you want, please elaborate:)

GitHub - roboll/helmfile: Deploy Kubernetes Helm Chartsattachment image

Deploy Kubernetes Helm Charts. Contribute to roboll/helmfile development by creating an account on GitHub.

Yossi Balan avatar
Yossi Balan

Hi , I am new in helmfile . is it possible to do inherit from helmfile ? meaning that I have 1 helmfile with values and I want second helmfile to get all the data from the first one and to add some data like hooks and info

Evan Pitstick avatar
Evan Pitstick

Yes, you can see the bases section near the bottom of https://github.com/roboll/helmfile/tree/v0.142.0#configuration

GitHub - roboll/helmfile at v0.142.0attachment image

Deploy Kubernetes Helm Charts. Contribute to roboll/helmfile development by creating an account on GitHub.

Evan Pitstick avatar
Evan Pitstick

you an also see examples of yaml anchors in https://github.com/roboll/helmfile/tree/v0.142.0#labels-overview

GitHub - roboll/helmfile at v0.142.0attachment image

Deploy Kubernetes Helm Charts. Contribute to roboll/helmfile development by creating an account on GitHub.

Yossi Balan avatar
Yossi Balan

it is a different way without the base option ?

Yossi Balan avatar
Yossi Balan

so if I got it I have 2 yaml parent and child in the child I will add to the base the parent and than I need to add all the structures to add values meaning in the child I need to add release: parentA - name:A values newy

Evan Pitstick avatar
Evan Pitstick

yes, two different ways though they could be used together. from what i understand bases doesn’t support any kind of merging of the files so some cases will require using yaml anchors.

Evan Pitstick avatar
Evan Pitstick

it’s not clear to me what you’re trying to do but I only started reading the docs a bunch last night. maybe if you had some actual examples or some kind of picture it would be more clear to me.

Yossi Balan avatar
Yossi Balan

yes I will add now

Yossi Balan avatar
Yossi Balan
---

releases:
  - name: controller
    version: "1.0.0"
    values:
      - image:
          repository: controller-repo
          tag: {{ .Values.tag }}
          pullPolicy: Never
  - name: controller2
    version: "2.0.0"
    values:
      - image:
          repository: controller-repo2
          tag: {{ .Values.tag2 }}
          pullPolicy: Never
Yossi Balan avatar
Yossi Balan

this is the parent

Yossi Balan avatar
Yossi Balan

now I want to create new file that will get all the values of the first yaml and will add those one

Yossi Balan avatar
Yossi Balan
values:
  x:y
hooks:
 - events: [ "postsync" ]
   showlogs: true
   command: "bash"
   args: [ "myFile"]
Yossi Balan avatar
Yossi Balan

so if I understood you right I need to so something like this

Yossi Balan avatar
Yossi Balan
---
  - parent.yaml
releases:
  - name: controller
    values:
      x: y
    hooks:
      - events: [ "postsync" ]
        showlogs: true
        command: "bash"
        args: [ "myFile"]
Yossi Balan avatar
Yossi Balan

I hope it is clear

Yossi Balan avatar
Yossi Balan

The idea it to have super yaml and than to create another yaml that use all the data/values from the super yaml and add his modification in the values/hooks section

Evan Pitstick avatar
Evan Pitstick

I think you’d want to use something like https://github.com/roboll/helmfile/tree/v0.142.0#labels-overview

Evan Pitstick avatar
Evan Pitstick

which one do you want to be the “super” yaml file?

Evan Pitstick avatar
Evan Pitstick

well, either way, the “super” yaml would be your template

Evan Pitstick avatar
Evan Pitstick

yaml anchors are part of the yaml spec, not just a helmfile thing

Evan Pitstick avatar
Evan Pitstick

It looks like this page has a friendly introduction to it but you might want to look around some more

Don’t Repeat Yourself with Anchors, Aliases and Extensions in Docker Compose Files

Take advantage of YAML and Docker Compose features to reduce repetition.

Evan Pitstick avatar
Evan Pitstick
Optimize GitLab CI/CD configuration files | GitLab

Documentation for GitLab Community Edition, GitLab Enterprise Edition, Omnibus GitLab, and GitLab Runner.

Evan Pitstick avatar
Evan Pitstick

neither of them are talking about helmfile specifically but the way anchors are used are kind of the same

Yossi Balan avatar
Yossi Balan

I will try , thanks

2021-12-08

2021-12-09

Moshe Abramovitch avatar
Moshe Abramovitch

Hi All I am trying to do simple helm config using helmfile but no success.

as mention here (overriding-values-from-a-parent-chart) I would like to provide one parent configuration and override release value.

this is a release configmap charts/microservice-a/templates/configmap.yaml

apiVersion: v1
kind: ConfigMap
metadata:
  labels: {{- include "microservice-a.labels" . | nindent 4 }}
  name: {{ include "microservice-a.fullname" . }}-config
  namespace: {{ .Release.Namespace }}
data:
  MODEL.EN: {{ .Values.model.en }}

this is my helmfile.yaml

releases:
  - name: microservice-a
    chart: ../charts/microservice-a
    values:
      - "../charts/microservice-a/values.yaml"
      - "./environments/{{ .Environment.Name }}/values.yaml"

and this is my environments/default/values.yaml

microservice-a:
  model:
    en: "model-en-1.0.mdl"

I found that the {{ .Values.model.en }} in the configmap can not be reslove.

What am I doing wrong ?

Subcharts and Global Values

Interacting with a subchart’s and global values.

1

2021-12-10

Aaron avatar

Greetings! For a long running hook command (like watching a canary progress) is it possible to stream logs in some way? Currently it seems the logs are only output once the hook completes.

2021-12-20

Peter avatar

Hi, I would like to have some recommendations, since we want to integrate helmfile in our deployment process…

Our infrastructure has following details:

• we have many customers

• all customers have the same installed services (each customer get’s it’s own services, no sharing between customers)

• credentials are different for all customers

• we have seperate deployment process (we dont want to upgrade all customers at the same time)

• all customer-config data is seperated into seperate config files, like:

• -> config/customer1.yaml

• -> config/customer2.yaml

• -> config/customer3.yaml So I’m wondering, if we should use “Environment” with the customer name, to upgrade it.. or would you recommend another variable? And do you think it’s better to create multiple helmfiles for this process, or just one? Thank you!

steenhoven avatar
steenhoven

I would recommend using Environment per customer and set the kubecontext there. For values per customer, I’d make it regex’able like

    values:
      - ./{{`{{ .Release.Name }}`}}/{{`{{ .Environment.Name }}`}}.yaml.gotmpl

Where .Environment.Name is your customers name or something

Peter avatar

ok thank you!

2021-12-21

Micah Huber avatar
Micah Huber

hi folks! Thanks so much for creating helmfile - it is one of the most useful tools on the SRE team i’m on. QQ - any plans to start releasing a darwin arm64 (m1 mac) build?

2021-12-22

adrian avatar

Hi, how is this PR supposed to work? https://github.com/roboll/helmfile/pull/1745

feat: Helmfile renders *.yaml.gotmpl in a K8s manifests/kustomization directory by mumoshu · Pull Request #1745 · roboll/helmfileattachment image

Related to #494 This feature is mostly a built-in alternative to incubator/raw chart without external dependency and has access to helmfile's own template functions and template data. The expec…

adrian avatar

I’d like to be able to add more manifests/templates to a release

feat: Helmfile renders *.yaml.gotmpl in a K8s manifests/kustomization directory by mumoshu · Pull Request #1745 · roboll/helmfileattachment image

Related to #494 This feature is mostly a built-in alternative to incubator/raw chart without external dependency and has access to helmfile's own template functions and template data. The expec…

2021-12-29

Andrew Nazarov avatar
Andrew Nazarov

I’ve just come across this tool which seems to be an alternative to helmfile. https://github.com/helmwave/helmwave

GitHub - helmwave/helmwave: :ocean: Helmwave is like docker-compose for @helmattachment image

Helmwave is like docker-compose for @helm. Contribute to helmwave/helmwave development by creating an account on GitHub.

1

2021-12-30

steenhoven avatar
steenhoven

Hmm. Look definitively nice, but have everything in helmfile already. Only real plus is multi environment at once

z0rc3r avatar

I don’t see alternative to helmfile’s needs.

    keyboard_arrow_up