Skip to content
This repository was archived by the owner on Oct 19, 2024. It is now read-only.

fix: repo.GetAppDetails().Helm.parameters not get argocd override value - #392

Open
ss75710541 wants to merge 3 commits into
argoproj-labs:masterfrom
paradeum-team:jyliu
Open

fix: repo.GetAppDetails().Helm.parameters not get argocd override value#392
ss75710541 wants to merge 3 commits into
argoproj-labs:masterfrom
paradeum-team:jyliu

Conversation

@ss75710541

Copy link
Copy Markdown

…erride value

@CLAassistant

CLAassistant commented Mar 15, 2022

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@ss75710541 ss75710541 changed the title fix: repo.GetAppDetails().Helm.parameters get argocd override value fix: repo.GetAppDetails().Helm.parameters get not argocd override value Mar 15, 2022
@ss75710541 ss75710541 changed the title fix: repo.GetAppDetails().Helm.parameters get not argocd override value fix: repo.GetAppDetails().Helm.parameters not get argocd override value Mar 15, 2022
@joaogl

joaogl commented Mar 24, 2022

Copy link
Copy Markdown

Is there a way to use this already?
How can I help push this forward?

@ss75710541

ss75710541 commented Mar 25, 2022

Copy link
Copy Markdown
Author

@joaogl
I made a Docker image based on my code branch

code branch:
https://github.com/paradeum-team/argocd-notifications/tree/jyliu

image:
quay.io/netwarps/argocd-notifications:v1.2.1.1

@tyki6

tyki6 commented Apr 6, 2022

Copy link
Copy Markdown

hi, @ss75710541
i tested your version because im very interesting by this feature and im still faced same issues i receive default value and not override values
Regards

@tyki6

tyki6 commented Apr 6, 2022

Copy link
Copy Markdown

my notification:

templates: 
  template.app-deployed: |
    webhook:
      alpha:
        method: POST
        body: |
          {
            "attachments": [{
              "title": "{{ .app.metadata.name}}",
              "title_link":"{{.context.argocdUrl}}/applications/{{.app.metadata.name}}",
              "color": "#18be52",
              "fields": [
              {
                "title": "Git TAG",
                "value": "{{(call .repo.GetAppDetails).Helm.GetParameterValueByName "image.tag"}}",
                "short": true
              }
              ]
            }]
          }

my application:

apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
  name: test
  namespace: argocd
  annotations:
    argocd.argoproj.io/sync-wave: "3"
    notifications.argoproj.io/subscribe.on-deployed.alpha: ""
spec:
  source:
    path: golang
    repoURL: {{ .Values.apps_repo }}
    targetRevision: aws
    helm:
      releaseName: test
      values:         |
        nameOverride: test
        fullnameOverride: test
        imagePullSecrets:
        - name: regcred
        image:
          repository: my-img
          tag: 2.0.13
  syncPolicy:
    automated:
      prune: true
      selfHeal: true
  destination:
    name: {{ .Values.cluster }}
    namespace: test
  project: default

@ss75710541

Copy link
Copy Markdown
Author

@mbouamama Did you test with the Docker image I typed? Or docker image yourself building to the code? Is jyliu branch not selected?

@ss75710541

Copy link
Copy Markdown
Author

@mbouamama
git clone https://github.com/paradeum-team/argocd-notifications.git
cd argocd-notifications
git checkout jyliu

@tyki6

tyki6 commented Apr 6, 2022

Copy link
Copy Markdown

@ss75710541 i tested with our image quay.io/netwarps/argocd-notifications:v1.2.1.1

@ss75710541

Copy link
Copy Markdown
Author

@mbouamama
Well, I solved helm. Parameters values, not helm.values

@tyki6

tyki6 commented Apr 6, 2022

Copy link
Copy Markdown

ah ok do you will fix .Helm.GetParameterValueByName too or i need to do that by my self?
Regards

@ss75710541

Copy link
Copy Markdown
Author

@mbouamama
You can try to fix it out yourself first. I've been busy lately.

@tyki6

tyki6 commented Apr 6, 2022

Copy link
Copy Markdown

ok thx have good day @ss75710541
thx for your work!

@ss75710541
ss75710541 force-pushed the jyliu branch 3 times, most recently from 6387ed8 to e3072b0 Compare April 26, 2022 11:20
@ss75710541

Copy link
Copy Markdown
Author

@tyki6
I changed the code to add get helm.values
Priority values
helm.values > helm.parameters > default helm.parameters
test image quay.io/netwarps/argocd-notifications:v1.2.1.4

@tyki6

tyki6 commented Apr 27, 2022

Copy link
Copy Markdown

@ss75710541 i tested and my problem is solved thx a lot(s you did an amazing job.
Regards

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants