roboll / helmfile

Deploy Kubernetes Helm Charts
MIT License
4.03k stars 567 forks source link

Support multiple -f parameters #506

Closed blissd closed 8 months ago

blissd commented 5 years ago

Using helmfile -f allows either a single helmfile.yaml or a directory containing multiple helmfile.yamls to be selected.

Also, you can specify -f more than once without helmfile complaining. However, it appears to only process the the first helmfile.yaml that is passed.

Please could you support specifying multiple -f arguments as a flexible alternative to providing a directory of helmfiles?

My use case is having a directory structure like this:

deploy/
  helmfile.yaml
  values.yaml
  localtesting/
    helmfile.yaml
  production/
    values.yaml
    secrets.yaml
  staging/
    values.yaml
    secrets.yaml

I'd like to be able to run helmfile -f deploy/helmfile.yaml -f deploy/localtesting/helmfile.yaml. For me, this allows deploy/helmfile.yaml to contain my application, and then deploy/localtesting to contain extra test charts (to install things like databases used during testing).

blissd commented 5 years ago

I should add that for my use-case each helmfile.yaml is self-contained.

mumoshu commented 5 years ago

Sounds like a good addition to helmfile! Would you mind submitting a PR for this?

blissd commented 5 years ago

I can give it a go. Now, I know this reveals I'm a total golang noob, but I can't get the project to build. Running make or make build spits out a bunch of compilation errors. Is there a helpful guide for getting setup for development?

mumoshu commented 5 years ago

@blissd Thanks a lot for trying 👍

Probably you need to clone the project under $GOPATH. If the envvar GOPATH isn't set yet, as the default GOPATH is $HOME/go, try:

$ git clone git@github.com:roboll/helmfile.git ~/go/src/github.com/roboll/helmfile
$ cd $_
$ make build

If it doesn't work yet, I'd suggest checking your golang version. 1.11.2 would work as we use it in our CI!