#helmfile (2022-08)

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/

2022-08-01

2022-08-03

Andrew Nazarov avatar
Andrew Nazarov

We’re thinking how we can use helmfile to add a new object definition to a third-party chart we have no control over. I know that it should be possible, but can’t find any examples. Appreciate any help)

voron avatar

Oblivious option is to use raw chart to deploy raw manifests + helmfile dependencies. But it may not suit your needs. I have some ugly example of strategicMergePatches to patch resulting yaml on the fly:

  - name: test0
    namespace: test0
    createNamespace: true
    chart: dysnix/nginx
    wait: false
    waitForJobs: false
    atomic: false
    values:
      - values/test0.yaml.gotmpl
    strategicMergePatches:
      - apiVersion: apps/v1
        kind: Deployment
        metadata:
          name: test0-nginx
        spec:
          template:
            spec:
              initContainers:
                - name: sleep
                  image: alpine:latest
                  imagePullPolicy: "IfNotPresent"
                  command:
                    - /bin/sh
                    - -c
                    - sleep 7200
Andrew Nazarov avatar
Andrew Nazarov

Yes, I definitely have a raw chart solution in my mind, but thought that maybe there would be a more elegant solution to treat the whole thing as a bundle.

In your example it seems this dysnix/nginx has a Deployment object, right, and you just mutate it? We tried with strategicMergePatches: with a new object and helmfile threw an error: failed to find unique target for patch

voron avatar

yes, strategicMergePatches works w/ existing object only

Andrew Nazarov avatar
Andrew Nazarov

Yeah, that’s what I thought. It seems the less cryptic way would be, as you mentioned, a new release with an additional object even though I would like to avoid it. Thanx!

1

2022-08-04

Moath avatar

Hi All, How can I add an already deployed helm chart to be managed by helmfile? Thank you!

voron avatar

Hi, you may try to write a helmfile release using values from deployed helm chart helm get values <release-name>

2022-08-10

Rinat Ishmukhametov avatar
Rinat Ishmukhametov

Hello everyone, I’m just starting with helmfile and was wandering whether it can sufficiently cover the following use-case: I have multiple micro-services with separated charts - I use single umbrella-chart to install them at once. Everything works fine until I want to install separate chart into an environment where umbrella had already been installed… I came up with a few hacks but this is wrong and against best practices (according to this issue https://github.com/helm/helm/issues/9433) Is it possible to manage charts like that with helmfile without aforementioned issue? I.e. install charts both separately and through helmfile?

steenhoven avatar
steenhoven

Yep, perfectly possible with helmfile.

Rinat Ishmukhametov avatar
Rinat Ishmukhametov

@steenhoven so I can install my chart (for service A) into the namespace and then install a bundle of charts (service A, B, C etc.) into same namespace through helmfile without problems?

steenhoven avatar
steenhoven

no. But you can create different ‘stacks’ for different environments.

2022-08-11

Rinat Ishmukhametov avatar
Rinat Ishmukhametov

hello again) I think I miss something about Environment values files https://helmfile.readthedocs.io/en/latest/#environment as per this example I’m able to use separate values from values.yaml in environments section (in the values.yaml.gotmpl) But is there a way to simply merge the whole values file from environments section? my helmfile looks like this right now

environments:
  default:
    values:
      - git::<https://gitlab-ci-token>:{{ env "CI_JOB_TOKEN" }}@gitlab

releases:
  - name: my_app
    namespace: staging
    chart: repo/chart
    version: 0.5.0
    values:
      - "values.yaml"
      - "values.yaml.gotmpl"
Rinat Ishmukhametov avatar
Rinat Ishmukhametov

ok, found out that it’s rather easy to control this via go-templating

Sean avatar

Does helmfile support helm’s native hooks?

"helm.sh/hook": pre-install,pre-upgrade,post-install,post-upgrade
Sean avatar

We are using a vendor’s chart which has [helm.sh/hook](http://helm.sh/hook) specified. Do you know if helmfile will execute those?

I’ve found that Kustomize, Spinnaker, Argo, Flux, … will not.

voron avatar

helmfile is just a wrapper for helm, thus the hook should be executed by helm, if not disabled explicitly

2022-08-12

2022-08-13

2022-08-22

Jonathan Monnet avatar
Jonathan Monnet

hi everyone, did someone already use th adhoc features ? i’m trying to add certificate generation to my existing helm charts

releases:
- name: concourse
    <<: *default
    dependencies:
    - chart: charts/certificates/

with a subchart like this

├── charts
│  └── certificates
│     ├── Chart.yaml
│     ├── templates
│     │  └── certificate.yaml
│     └── values.yaml

and i’ve got an error that i don’t understand.. COMMAND: helm template --debug=false --output-dir=/tmp/chartify1738494718/concourse/concourse/concourse/helmx.1.rendered concourse /tmp/chartify1738494718/concourse/concourse/concourse -f /tmp/chartify1738494718/concourse/concourse/concourse/values.yaml -f /tmp/helmfile3009150001/concourse-concourse-values-5968dd4c6b --namespace concourse

OUTPUT: Error: found in Chart.yaml, but missing in charts/ directory: certificates] in ./helmfile.yaml: [exit status 1

COMMAND: helm template --debug=false --output-dir=/tmp/chartify1738494718/concourse/concourse/concourse/helmx.1.rendered concourse /tmp/chartify1738494718/concourse/concourse/concourse -f /tmp/chartify1738494718/concourse/concourse/concourse/values.yaml -f /tmp/helmfile3009150001/concourse-concourse-values-5968dd4c6b --namespace concourse

OUTPUT: Error: found in Chart.yaml, but missing in charts/ directory: certificates]

2022-08-23

gandheharshith avatar
gandheharshith

Anyone facing the same issue ?

Balazs Varga avatar
Balazs Varga

did you try to find the helmfile with locate or which command ?

gandheharshith avatar
gandheharshith

Solved the issue. Our anti virus or something saw that as a threat and kep deleting that file no matter how many times I download it … Thanks for the reply … Noob mistake ik.

1
gandheharshith avatar
gandheharshith

Command not found even after installing right before

2022-08-30

Balazs Varga avatar
Balazs Varga

how can I use –three-way-erge with helmfile? I added a new annotation to my deployment and tried to set HELM_DIFF_THREE_WAY_MERGE=true an dthen run helmfile diff but I did not get any changes back

    keyboard_arrow_up