0

I have a following Helmlife:

environments:
  {{ range $index,$item := readDirEntries "./environment" }}
    {{- if $item.IsDir -}}
    {{- $item.Name -}}
    {{- end -}}
  {{- end -}}

releases:
- name: system-{{ .Environment.Name }}
  createNamespace: true
  chart: ./charts/dsp-system
  namespace: system-{{ .Environment.Name }}
  values:
    - ./environment/{{ .Environment.Name }}/values.yaml

However it outputs that some error occurs in the environments field, and error is connected with templating that I had done

  • Do you have the exact error? Is it related to the `range` loop in the `environments:` block, or the `{{ .Environment.Name }}` reference in the `releases:`? There are at least some cases where you need to double-template things in `helmfile.yaml` but I'm not totally sure if this is one of the cases. – David Maze Dec 16 '22 at 14:15

0 Answers0