helmfile
helmfile copied to clipboard
Need a very simple example of what is required for DRY sub-helmfiles
I'm almost certainly being rather stupid here, but I cannot for the life of me "get" it yet
I'm wanting to :
- Have a "root"
helmfile.yaml
that is simply a "launcher/wrapper" for a number of sub-helmfiles - Allow each sub-helmfile to be run alone, if required
- Have "global" values in each environment values file
So, something like:
.
├── environments.yaml
├── helmfiles
│ └── cert-manager
│ ├── helmfile.yaml
│ ├── repositories.yaml
│ └── values.yaml.gotmpl
├── helmfile.yaml
├── production.yaml
└── staging.yaml
2 directories, 7 files
helmfile.yaml
bases:
- environments.yaml
---
helmfiles:
- path: helmfiles/cert-manager/helmfile.yaml
values:
- {{ toYaml .Values | nindent 6 }}
environments.yaml
environments:
default:
values:
- staging.yaml
production:
values:
- production.yaml
helmfiles/cert-manager/helmfile.yaml
bases:
- ../../environments.yaml
- repositories.yaml
---
releases:
- name: cert-manager
namespace: "cert-manager"
chart: jetstack/cert-manager
version: 1.7.1
installed: true
values:
- values.yaml.gotmpl
As it stands, if I invoke helmfile -e default lint
from the top-level directory, I get an error:
in ./helmfile.yaml: in .helmfiles[0]: in helmfiles/cert-manager/helmfile.yaml: failed to read ../../environments.yaml: environment values file matching "staging.yaml" does not exist in "."
I'm guessing that the problem is due to - ../../environments.yaml
in the helmfiles/cert-manager/helmfile.yaml
file, but if I remove that line, I cannot then run it in isolation?
As I stated earlier, it's me not getting it, so I could dearly love it if some could point me to a very simple example that shows what I'm trying to achieve (I've looked at the official docs & examples, but I'm struggling)
TIA
Just realised that I can invoke a single release by using -l name=[RELEASE_NAME]
- perhaps that is my solution, but it doesn't "feel" right