Skip to content
This repository has been archived by the owner on Feb 7, 2024. It is now read-only.

Get Helm values or annotations #383

Open
joaogl opened this issue Feb 23, 2022 · 2 comments
Open

Get Helm values or annotations #383

joaogl opened this issue Feb 23, 2022 · 2 comments
Labels
enhancement New feature or request

Comments

@joaogl
Copy link

joaogl commented Feb 23, 2022

Summary

Hey,
There should be a way to get helm values that were overrided in the app installation, or to access the application annotations.

Use Cases

I would use this for passing data that I want to use later in the notifications.
For instance, my current application is as follows:

apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
  name: "auth-${PR}"
  namespace: argocd
  annotations:
    myapps.com/url: "${PR}.myapps.com"
    notifications.argoproj.io/subscribe.discord.discord: ""
    notifications.argoproj.io/subscribe.on-deployed.discord: ""
  finalizers:
    - resources-finalizer.argocd.argoproj.io
spec:
  project: previews
  source:
    path: "charts/app1"
    repoURL: git@github.com:my-apps/app1.git
    targetRevision: HEAD
    helm:
      values: |
        ingress:
          host: ${PR}.myapps.com
      version: v3
  destination:
    namespace: "${PR}"
    server: https://kubernetes.default.svc
  syncPolicy:
    automated:
      selfHeal: true
      prune: true
    syncOptions:
      - CreateNamespace=true

Using this, I cannot access neither the annotation myapps.com/url nor the helm ingress.host value.
I know there's a way to access the helm values {{(call .repo.GetAppDetails).Helm.GetParameterValueByName "ingress.host"}} but for some super wierd reason I get back the Helm default value and not the overrided value rendering this feature pretty useless to me.


Message from the maintainers:

Impacted by this bug? Give it a 👍. We prioritise the issues with the most 👍.

@joaogl joaogl added the enhancement New feature or request label Feb 23, 2022
@ss75710541
Copy link

I have the same problem, GetParameterValueByName get the helm chart default value, I want to get the modified value of argocd

@ss75710541
Copy link

I submitted a PR
#392

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants