#helmfile - March 2023

William
Williamover 3 years ago(edited)
Hi everyone!

Is there anyway that helmfile apply will do an upgrade of a release even when helm diff does not detect changes in that release?

Currently what we see is that we have a release A and B.
1. Helm diff detects changes in release A but not in B
2. We get the information that release A is updated from helm diff.
3. Afterwards, we get the output in terminal "Affected releases are: B Updated"
4. Checking the cluster afterwards in helm list - we can see the version number has incremented for both releases
Phil
Philover 3 years ago
Hey guys!

Is there anyway to "package" a helmfile? It's already possible to point to a remote helmfile, but what I'd like to do is to add some custom manifests into it (like argocd application, config file, etc), but I'm not sure what's the best way to achieve that. The simplest way I can think of would be to just write all those manifests into the helmfile itself, but looking at the full helmfile specification I don't think it's possible to do that.
Viacheslav
Viacheslavover 3 years ago
Hi everyone,

As a part of the automation pipeline, I generate stateValues.yaml , and my helmfiles located in helmfile.d/ . But when I run apply or template, I got this error:
helmfile --state-values-file stateValues.yaml template -e asa -l app=kubeflow-core -i --skip-deps
in helmfile.d/00-cluster-addons.yaml: environment values file matching "stateValues.yaml" does not exist in "."

As I understand, it happens because the working directory changed to helmfile.d/ when Helmfile proceeded multiple helmfiles, but my stateValues.yaml locates in the root folder, so Helmfile tries to find helmfile.d/satetValues.yaml and fails, because a path to this file is relative.

My question: is there any applicable solution for this issue, besides providing a state values file as ${PWD}/stateValues.yaml ? Maybe some change of folders structure (environments, bases, helmfile.d) may help?

I’ll be glad to hear any advice.
Andrew Nazarov
Andrew Nazarovover 3 years ago
Hi. A question about the helmfile’s get function. I’m wondering if it supports nesting. For example if I want to use as default a value of .Values.myAnotherValue , but if this doesn’t exist - some another default. Couldn’t figure out the syntax. The naive assumption would be something like:
myVal: {{ .Value | get "myValue" (get "myAnotherValue" "1" ".Value") }}

But it definitely won’t work.
Or what would be a proper way to achieve something like this?
Brandon
Brandonover 3 years ago
where can I find docs explaining all the ways to use ref+ strings? I want to try and use them to refer to a non-secret file.
Ihor Urazov
Ihor Urazovover 3 years ago
It here a way in helmfile.yaml to set --skip-crds for one specific deployment? I have one chart deployment that includes CRDs that won't be needed in my case, but rest of deployments in the same helmfile must install crds.
Ivo
Ivoover 3 years ago
I'm just getting started with Helmfile. I have this basic helmfile:
releases:
  - name: argo-cd
    namespace: argocd
    chart: ../../../charts/argo-cd/5.23.3
    values:
      - ./values.yaml

The ArgoCD charts exists locally on my filesystem. When I run helmfile template I get:
Building dependency release=argo-cd, chart=../../../charts/argo-cd/5.23.3
in ./helmfile.yaml: [building dependencies of local chart: command "helm" exited with non-zero status:

PATH:
  helm

ARGS:
  0: helm (4 bytes)
  1: dependency (10 bytes)
  2: build (5 bytes)
  3: ../../../charts/argo-cd/5.23.3 (30 bytes)

ERROR:
  exit status 1

EXIT STATUS
  1

STDERR:
  Error: no repository definition for <https://dandydeveloper.github.io/charts/>. Please add the missing repos via 'helm repo add'

COMBINED OUTPUT:
  Error: no repository definition for <https://dandydeveloper.github.io/charts/>. Please add the missing repos via 'helm repo add']

Is Helmfile not able to resolve transitive dependencies? Do I need to specify this manually?
Ivo
Ivoover 3 years ago
dandydeveloper is a dependency of the ArgoCD Helm chart
Ivo
Ivoover 3 years ago
Can the repo be added automatically by Helmfile?
voron
voronover 3 years ago

Is Helmfile not able to resolve transitive dependencies? Do I need to specify this manually?

it's helm, not helmfile.
Ivo
Ivoover 3 years ago
ok
Gadi Dor
Gadi Dorover 3 years ago
Hi All
yxxhero
yxxheroover 3 years ago
welcome
Gadi Dor
Gadi Dorover 3 years ago
dose helmfile work with argocd?
yxxhero
yxxheroover 3 years ago
yeah.
Gadi Dor
Gadi Dorover 3 years ago
is there plugin ?
Dominic Cardellino
Dominic Cardellinoover 3 years ago
Hello,

I have the problem that when I use helmfile --environment k8s-dev diff --suppress-secrets I still see my provided secrets (via vault) in the output:

loki:
  storage_config:
    aws:
      bucketnames: k8s-{{ .Environment.Values.envPrefix }}-loki
      endpoint: <http://s3.eu-central-1.amazonaws.com|s3.eu-central-1.amazonaws.com>
      region: eu-central-1
      access_key_id: <ref+vault://secret/cluster-logging/{{> .Environment.Values.envPrefix }}/aws/s3?proto=https#/aws-access-key-id
      secret_access_key: <ref+vault://secret/cluster-logging/{{> .Environment.Values.envPrefix }}/aws/s3?proto=https#/aws-secret-access-key
      insecure: false
      sse_encryption: false
      s3forcepathstyle: true

I thought --suppress-secrets should hide them?
Nathanael
Nathanaelover 3 years ago
Hi there, i try to get started with helmfile.
is there a way to add individual yaml resources to a helmchart in helmfile? I tried to add a new (dummy)release and just referenced a normal subfolder with some yamls files. - in fact that worked.
repositories:
- name: cilium
  url: <https://helm.cilium.io/>
releases:
- name: cilium
  namespace: mgmt-cni-cilium
  chart: cilium/cilium
  version: 1.13.0
  values:
    - values.yaml
- name: resources
  chart: ./resources
  values:
    - values2.yaml  # <-- does not work :(

My next problem is: how can i use dynamic values with gotmpl on that subfolder? ( not realy a chart more like a bunch of gotmpl-yamls )
I noticed that {{ .Values.foo }} is not available in this subfolder release but something like {{ requiredEnv "NAME" }} dos work.
thanks for the help
yxxhero
yxxheroover 3 years ago