argocd-notifications
argocd-notifications copied to clipboard
fix: repo.GetAppDetails().Helm.parameters not get argocd override value
…erride value
Is there a way to use this already? How can I help push this forward?
@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
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
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
@mBouamama Did you test with the Docker image I typed? Or docker image yourself building to the code? Is jyliu branch not selected?
@mBouamama git clone https://github.com/paradeum-team/argocd-notifications.git cd argocd-notifications git checkout jyliu
@ss75710541 i tested with our image quay.io/netwarps/argocd-notifications:v1.2.1.1
@mBouamama Well, I solved helm. Parameters values, not helm.values
ah ok do you will fix .Helm.GetParameterValueByName too or i need to do that by my self? Regards
@mBouamama You can try to fix it out yourself first. I've been busy lately.
ok thx have good day @ss75710541 thx for your work!
@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
@ss75710541 i tested and my problem is solved thx a lot(s you did an amazing job. Regards