I have added trigger, template & webhook in configmap argocd-notifications-cm using folowing command:
kubectl edit cm argocd-notofications-cm -n argocd
The webhook is added like below:
service.webhook.mapper: | url: http://<IP>:<Port>
template is added like below:
template.mapping: | webhook: mapper: method: POST path: /post body: | { "xx": "yy"}
trigger is added like below:
`trigger.on-sync-succeeded: |
- description: abc
send:
- mapping: when: app.status.operationState.phase in ['Succeeded']`
I am deploying the application in ArgoCD using ApplicationSet object & helmchart. The directory structure is like be below inside root directory of github repo:
apps/app1/templates/.. apps/app1/chart apps/app1/Chart.yaml apps/app1/Values.yaml
argo-cd/argo_cd.yaml #Application Object arco_cd/apps.yaml # ApplicationSet argo_cd/httpbin.yaml # Application
In both Application & ApplicationSet objects, syncpolicy is like following:
syncPolicy: automated: selfHeal: true prune: true
Now question is how "apps" or "app1" will subscribe so that any sync success of app1 will send the POST request to httpbin?
I tried it by adding annotation under metadata of apps.yaml ApplicationSet object. But no notification is received.