argo-cd-helmfile icon indicating copy to clipboard operation
argo-cd-helmfile copied to clipboard

Integrated ArgoCD plugin parameters support ?

Open christiansen-merel opened this issue 1 year ago • 3 comments

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 avatar Jan 19 '24 11:01 christiansen-merel

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

christiansen-merel avatar Jan 25 '24 15:01 christiansen-merel

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 avatar Jan 26 '24 05:01 travisghansen

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

travisghansen avatar Jan 26 '24 05:01 travisghansen