Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for helm parameters (key:value) for imageupdater support #333

Closed
ricardojdsilva87 opened this issue Apr 4, 2022 · 2 comments
Closed

Comments

@ricardojdsilva87
Copy link
Contributor

Hello,

Regarding these issue already fixed:
#304
#309

Where a values.yaml file can be used with literal values instead of using the helm arguments.
I was wondering if there is any kind of way of using the parameters option like in an helm deployment. When specifying an helm deployment chart the values.yaml paramenters are loaded into the arrgocd UI. That enables the argocd imageupdater to update those values from the Application spec yaml.

project: project1
source:
  repoURL: 'repo URL'
  path: path
  targetRevision: main
  helm:
    valueFiles:
      - values.yaml
    parameters:
      - name: image.tag
        value: v1
        forceString: true
      - name: image.repository
        value: repo/image
      - name: image.credentials
        value: <path:secret-name#password>
    values: 'ingress: testurl.com'
destination:
  server: 'https://mycluster.com'
  namespace: test
syncPolicy: {}

Something similar to the above would replace the whole yaml under:

source:
  repoURL: repo
  targetRevision: 1.0.0
  plugin:
    name: test
    env:
      - name: HELM_VALUES
        value: |
            image.tag=v1
            image.repository=repo/image
            image.credentials=<path:secret-name#password>

If you need any more information or examples please ask.
Thanks!

@jkayani
Copy link
Member

jkayani commented Apr 8, 2022

Sorry, I don't think this is possible - this is because you can't put helm keys in an Argo app manifest while also using the plugin key (the way you tell Argo to use a custom plugin for an app). Even if this was possible, config plugins only have this information available to them: https://argo-cd.readthedocs.io/en/stable/user-guide/build-environment/, which doesn't include the settings passed in the helm key

@ricardojdsilva87
Copy link
Contributor Author

Hello @jkayani , thank you for answering,
I created a new question on the argocd image updater git asking the other way around:
argoproj-labs/argocd-image-updater#417

Maybe it's easier to crawl the values file and replace the needed values based on the entry needed. That would allow the argo-vault-plugin to keep doing the helm templating but with new variables.
Thank you

@jkayani jkayani closed this as completed May 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants