Skip to content
This repository has been 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
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

ss75710541
Copy link

…erride value

@CLAassistant
Copy link

CLAassistant commented Mar 15, 2022

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
Copy link

joaogl commented Mar 24, 2022

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

@ss75710541
Copy link
Author

ss75710541 commented Mar 25, 2022

@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
Copy link

tyki6 commented Apr 6, 2022

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
Copy link

tyki6 commented Apr 6, 2022

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
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
Author

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

@tyki6
Copy link

tyki6 commented Apr 6, 2022

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

@ss75710541
Copy link
Author

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

@tyki6
Copy link

tyki6 commented Apr 6, 2022

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

@ss75710541
Copy link
Author

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

@tyki6
Copy link

tyki6 commented Apr 6, 2022

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

@ss75710541
Copy link
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
Copy link

tyki6 commented Apr 27, 2022

@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