helmfile icon indicating copy to clipboard operation
helmfile copied to clipboard

helmfiles section not working as intended

Open kokolight opened this issue 2 years ago • 2 comments

I am trying to import multiple helmfiles into 1 helmfile as in the example like this:

root/helmfile.yaml

---
environments: 
  master: {}
  qa: {}

helmfiles:
  - path: charts/redis/helmfile.yaml

root/redis/helmfile.yaml

---
repositories:
  - name: bitnami
    url: https://charts.bitnami.com/bitnami

releases:
  - name: redis
    namespace: "default"
    chart: bitnami/redis
    missingFileHandler: Warn

I run this command from the root folder: helmfile -e qa template

but I get this error: err: no releases found that matches specified selector() and environment(qa), in any helmfile

Anyone encountered this?

kokolight avatar Mar 10 '22 17:03 kokolight

Hi @kokolight , as the message says:

err: no releases found that matches specified selector() and environment(qa), in any helmfile

There is no environment qa in your redis helmfile.

You can you use bases to work around this:

bases:
- environments.yaml

pathob avatar Mar 10 '22 18:03 pathob

Hey @pathob, thanks for the quick response. do I need to use bases in both files - the main helmfile and the redis helmfile? If so, there is another problem, I want each environment to use values from a file (values.envName.yaml) but If im using bases in the main helmfile the path of the file is different when using it inside the redis helmfile unless im putting all helmfiles in the same directory. Is there any way to make then in separate folders?

kokolight avatar Mar 10 '22 18:03 kokolight