Open mgarstecki opened 9 months ago
I am facing the same issue. Have only configured the webhook call with POST, but being sent as a GET.
facing the same issue
Same here. Configuring Discord notifications with webhook. Every request is made with GET which is not supported by Discord.
I am facing the same issue.
Same here!
We ran into this issue as well.
I noticed the new template i had created for sending webhooks was not being used at all (thus notification was being sent as GET by default).
Moving the webhook template in to a previously existing template we had for slack fixed the situation. Webhooks are now sent as POST.
notifiers:
service.slack: |
token: $slack-token
signingSecret: $slack-signing-secret
service.webhook.dispatcher: |
url: http://snip
headers:
- name: x-caller
value: prod-argocd
templates:
template.app-deployed: |
slack:
attachments: |
[
{
"title": "Application is synced and healthy {{ .app.metadata.name}}",
"title_link":"{{.context.argocdUrl}}/applications/{{.app.metadata.name}}",
"color": "#18be52",
"fields": [
{
"title": "Sync Status",
"value": "{{.app.status.sync.status}}",
"short": true
},
{
"title": "Revision",
"value": "{{.app.status.sync.revision}}",
"short": true
}
{{range $index, $c := .app.status.conditions}}
{{if not $index}},{{end}}
{{if $index}},{{end}}
{
"title": "{{$c.type}}",
"value": "{{$c.message}}",
"short": true
}
{{end}}
]
}
]
webhook:
dispatcher:
method: POST
path: /webhook
body: |
{
"app": {{toJson .app}},
"commit": {{toJson (call .repo.GetCommitMetadata .app.status.sync.revision)}}
}
triggers:
trigger.on-deployed: |
- description: Application is synced and healthy.
oncePer: app.status.sync.revision
send:
- app-deployed
when: app.status.operationState.phase in ['Succeeded'] and app.status.health.status == 'Healthy'
defaultTriggers: |
- on-deployed
subscriptions: |
- recipients:
- dispatcher
triggers:
- on-deployed
Checklist:
argocd version
.Describe the bug
We configured a webhook notification with a POST, but ArgoCD often calls it with a GET instead. This seems random across many of our apps, but not that rare (several hundred failures per day over a few thousand calls):
Failed to notify recipient {datadog-events } defined in resource argocd/ingress-preprod-ap-aws-1: request to { GET https://api.datadoghq.com/api/v1/events datadog-events} has failed with error code 403 : {"errors":["Forbidden"]}
We've only configured the webhook to be called with a POST, never with a GET.
To Reproduce
This is the relevant notification configuration:
The
template.datadog-events-release
section is the only place we call the webhook (so with a POST only).We don't know what are the exact conditions to reproduce it: some calls do get through (we see the results of the POSTs in the receiving system).
Expected behavior
We expect the target URL to only be called with a POST.
Version
Logs