travisghansen / argo-cd-helmfile

Integration between argo-cd and helmfile
MIT License
206 stars 54 forks source link

Integrated ArgoCD plugin parameters support ? #50

Closed christiansen-merel closed 5 months ago

christiansen-merel commented 6 months ago

Hello. First, thanks for the great work.

Is there a plan to support plugin parameters in Application scope ? here in documentation

For the example case from the ArgocD documentation:

apiVersion: argoproj.io/v1alpha1
kind: Application
spec:
  source:
    plugin:
      parameters:
        - name: FOO
          value: bar
        - name: REV
          value: test-$ARGOCD_APP_REVISION

The plugin would add --state-values-set FOO=bar --state-values-set REV=test-$ARGOCD_APP_REVISION to the helmfile command.

It could also use --state-values-file if the parameter value appears to be a file. It could fix issue #46 if I understand it well.

Does it makes sense ?

I might submit a PR if interrested.

christiansen-merel commented 5 months ago

Juste read the CMP Proposal I previously missed.

I guess it could be better to add values parameter(s) that mimic the helmfile release.values parameter. This feature would be valuable for ApplicationSet especially.

Usage example:

apiVersion: argoproj.io/v1alpha1
kind: Application
spec:
  source:
...
    plugin:
      parameters:
        - name: values
          map:
            attributeOne: foo
            attributeTwo: bar
          array:
          - values-as-file.yaml
travisghansen commented 5 months ago

I'm open to different approaches here for sure. I do support parameters already for the env vars that already exist, nothing preventing us from adding more features on this front.

travisghansen commented 5 months ago

See the parameters sub-command in the script around line 466. That are all available as cmp params and gui.