Skip to content

environments and helmfiles not working together #759

@asychev

Description

@asychev

Hi!

Maybe I'm doing something wrong, but this scenario not workinkg for me:

$ tree -L 2
.
├── app.yaml
├── charts
│   └── test
├── helmfile.yaml
└── values
    ├── app.gotmpl
    └── versions.yaml

3 directories, 4 files

helmfile.yaml:

environments:
  default:
    values:
      - values/versions.yaml

helmfiles:
  - app.yaml

app.yaml:

releases:
  - name: test
    chart: charts/test
    values:
      - values/app.gotmpl

values/app.gotmpl:

image:
  tag: "{{ .Environment.Values.version.app }}"

values/versions.yaml:

version:
  app: "1.12"

charts/test - just result of helm create test

The problem: helmfile template:

in ./helmfile.yaml: in .helmfiles[0]: in ./app.yaml: failed to render values files "values/app.gotmpl": failed to render [values/app.gotmpl], because of template: stringTemplate:2:22: executing "stringTemplate" at <.Environment.Values.version.app>: map has no entry for key "version"

What I'm doing wrong?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions