travisghansen / argo-cd-helmfile

Integration between argo-cd and helmfile
MIT License
213 stars 55 forks source link

Error: unknown flag: --skip-crds #35

Closed kfirfer closed 1 year ago

kfirfer commented 1 year ago

Hello

when I put this in helmfile.yaml:

helmDefaults:
  args:
    - "--skip-crds"

im getting this errror:

ComparisonError: rpc error: code = Unknown desc = Manifest generation error (cached): `argo-cd-helmfile.sh init` failed exit status 1: v3.10.3+g835b733 helmfile version 0.150.0 starting init Adding repo bitnami https://charts.bitnami.com/bitnami in ./helmfile.yaml: command "/usr/local/bin/helm" exited with non-zero status: PATH: /usr/local/bin/helm ARGS: 0: /usr/local/bin/helm (19 bytes) 1: repo (4 bytes) 2: add (3 bytes) 3: bitnami (7 bytes) 4: https://charts.bitnami.com/bitnami (34 bytes) 5: --force-update (14 bytes) 6: --skip-crds (11 bytes) ERROR: exit status 1 EXIT STATUS 1 STDERR: Error: unknown flag: --skip-crds COMBINED OUTPUT: Error: unknown flag: --skip-crds (retried 4 times).

When running helmfile sync its working I'm using ArgoCD applicationset, meaning I have argo apps generated automatically for many helmfiles, but I want only skip crds for specific helmfile

how can I do that ?

Thanks!

travisghansen commented 1 year ago

Can you use the HELM_TEMPLATE_OPTIONS env var or you have multiple helmfiles in the same argocd app?

kfirfer commented 1 year ago

i have multiple helmfiles but for different argocd apps, im using applicaionset

in some situiations i have also have multiple helmfiles in single argocd app

travisghansen commented 1 year ago

If you can set it at the argocd app level then the above will work. Otherwise you could split the helmfile releases into multiple apps using helmfile selectors.

Otherwise we will need to see if you can set default args on a per-subcommand basis in the helmfile or ask them to filter out default args under certain circumstances.

travisghansen commented 1 year ago

As an fyi my guess is if you manually run helmfile repos you will see an issue as well.

kfirfer commented 1 year ago

Thanks for reply ! unforthently there gonna be breaking changes if we change the current structure cause its depends on many releases

travisghansen commented 1 year ago

Does running helmfile repos manually have problems as well?

travisghansen commented 1 year ago

https://github.com/roboll/helmfile/issues/1957

kfirfer commented 1 year ago

@travisghansen Yes if i run helmfile repos its telling me aswell the error

Its I suppose helmfile bug, thanks a lot !

kfirfer commented 1 year ago

@travisghansen created ticket in the new repository: https://github.com/helmfile/helmfile/issues/713

travisghansen commented 1 year ago

Ok I’ll follow that conversation. 1 option would be to break your repos out into their helmfile file and only include that in your app helmfiles (what I do). I would then need to introduce a specific config option/env var which would let you give a path to the repos file and use it specifically during the init process.

If a fix is implemented into core helmfile that would likely be the best route so let’s see where that goes.