This repository has been archived by the owner on Oct 19, 2024. It is now read-only.
Failed to notify recipient {webhook dingtalk } defined in resource xxx: notification service 'webhook dingtalk' is not supported #416
Answered
by
meetgrinder
lazychanger
asked this question in
Q&A
-
apiVersion: v1
kind: ConfigMap
metadata:
labels:
app.kubernetes.io/component: notifications-controller
app.kubernetes.io/instance: argocd
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/name: argocd-notifications-controller
app.kubernetes.io/part-of: argocd
helm.sh/chart: argo-cd-4.9.11
name: argocd-notifications-controller-cm
namespace: argocd
data:
context: |
argocdUrl: "http://argocd.example.com"
service.webhook.dingtalk: |
url: https://oapi.dingtalk.com/robot/send?access_token=$dingtalk-accesstoken
headers:
- name: Content-Type
value: application/js
subscriptions: |
- recipients:
- webhook:dingtalk
triggers:
- on-sync-running
- on-sync-failed
- on-sync-status-unknown
- on-deployed
- on-sync-succeeded
- on-health-degraded
template.app-sync-change: |
webhook:
dingtalk:
method: POST
body: |
{
"msgtype": "markdown",
"markdown": {
"title":"ArgoCD sync status",
"text": "### ArgoCD sync status\n> - appname: {{.app.metadata.name}}\n> - app sync status: {{ .app.status.operationState.phase}}\n> - date:{{.app.status.operationState.startedAt}}\n> - URL: [jump ArgoCD]({{.context.argocdUrl}}/applications/{{.app.metadata.name}}?operation=true) \n"
}
}
trigger.on-deployed: |
- description: Application is synced and healthy. Triggered once per commit.
oncePer: app.status.sync.revision
send:
- app-deployed
when: app.status.operationState.phase in ['Succeeded'] and app.status.health.status == 'Healthy'
trigger.on-health-degraded: |
- description: Application has degraded
send:
- app-health-degraded
when: app.status.health.status == 'Degraded'
trigger.on-sync-failed: |
- description: Application syncing has failed
send:
- app-sync-failed
when: app.status.operationState.phase in ['Error', 'Failed']
trigger.on-sync-running: |
- description: Application is being synced
send:
- app-sync-running
when: app.status.operationState.phase in ['Running']
trigger.on-sync-status-unknown: |
- description: Application status is 'Unknown'
send:
- app-sync-status-unknown
when: app.status.sync.status == 'Unknown'
trigger.on-sync-succeeded: |
- description: Application syncing has succeeded
send:
- app-sync-succeeded
when: app.status.operationState.phase in ['Succeeded'] time="2022-07-05T03:18:00Z" level=info msg="Start processing" resource=argocd/v3-api
time="2022-07-05T03:18:00Z" level=info msg="Trigger on-sync-running result: [{[0].xGlbhcF_taGYrI3UsrQsINn2hl0 [app-sync-running] false}]" resource=argocd/v3-api
time="2022-07-05T03:18:00Z" level=info msg="Trigger on-sync-failed result: [{[0].H9WjsqG1dKYm6njOZ7yUQYOA1Wk [app-sync-failed] false}]" resource=argocd/v3-api
time="2022-07-05T03:18:00Z" level=info msg="Trigger on-sync-status-unknown result: [{[0].6SzWb05EK-0v90hwjyytTbN7S6A [app-sync-status-unknown] false}]" resource=argocd/v3-api
time="2022-07-05T03:18:00Z" level=info msg="Trigger on-deployed result: [{[0].y7b5sbwa2Q329JYH755peeq-fBs 936f8edfabf78c47a015e0c047af5c28d70f7aa3 [app-deployed] true}]" resource=argocd/v3-api
time="2022-07-05T03:18:00Z" level=info msg="Notification about condition 'on-deployed.[0].y7b5sbwa2Q329JYH755peeq-fBs' already sent to '{webhook dingtalk}'" resource=argocd/v3-api
time="2022-07-05T03:18:00Z" level=info msg="Trigger on-sync-succeeded result: [{[0].zxM90Et6k4Elb1-fHdjtDJq0xR0 [app-sync-succeeded] true}]" resource=argocd/v3-api
time="2022-07-05T03:18:00Z" level=info msg="Sending notification about condition 'on-sync-succeeded.[0].zxM90Et6k4Elb1-fHdjtDJq0xR0' to '{webhook dingtalk}'" resource=argocd/v3-api
time="2022-07-05T03:18:00Z" level=error msg="Failed to notify recipient {webhook dingtalk} defined in resource argocd/v3-api: notification service 'webhook' is not supported" resource=argocd/v3-api
time="2022-07-05T03:18:00Z" level=info msg="Trigger on-health-degraded result: [{[0].zoG5zUjYGjimkwCGgIQGjx1hO5s [app-health-degraded] false}]" resource=argocd/v3-api
time="2022-07-05T03:18:00Z" level=info msg="Processing completed" resource=argocd/v3-api |
Beta Was this translation helpful? Give feedback.
Answered by
meetgrinder
Jul 14, 2022
Replies: 1 comment 1 reply
-
what's going on here? I don't quite understand your subscriptions section and if that's where you think the wiring between triggers and webhook service is |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
lazychanger
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
what's going on here?
you have 1 template defined: template.app-sync-change
but none of your triggers "send" to that template which is for using the webhook service
I don't quite understand your subscriptions section and if that's where you think the wiring between triggers and webhook service is