Argo CD Notification Controller Fails with error " notification service 'webhook' is not supported "
search cancel

Argo CD Notification Controller Fails with error " notification service 'webhook' is not supported "

book

Article ID: 438294

calendar_today

Updated On:

Products

VMware vSphere Kubernetes Service VMware vSphere ESXi

Issue/Introduction

  • The Argo CD Notification Controller receives a trigger but is unable to send the notification to the external webhook.
  • The notification controller pod logs display the following sequence and errors:
    {"level":"info","msg":"Trigger on-sync-succeeded-gitlab result: [{[0].########################### [webhook-name-trigger] true}]","resource":"argocd-instance-namespace/cbs","time":"YYYY-MM-DDT05:19:54Z"}
    
    {"level":"info","msg":"Sending notification about condition 'on-sync-succeeded-gitlab.[0].###########################' to '{webhook webhook-name}' using the configuration in namespace argocd-instance-namespace","resource":"argocd-instance-namespace/cbs","time":"YYYY-MM-DDT05:19:54Z"}
    
    {"level":"error","msg":"Failed to notify recipient {webhook webhook-name} defined in resource argocd-instance-namespace/cbs: notification service 'webhook' is not supported using the configuration in namespace argocd-instance-namespace","resource":"argocd-instance-namespace/cbs","time":"YYYY-MM-DDT05:19:54Z"}

Environment

VMware vCenter Server 
VMware vSphere Kubernetes Service
Argo CD Supervisor Service

Cause

The failure caused by an incorrect subscription annotation syntax applied to the Argo CD application metadata.
When .webhook is explicitly included in the annotation key, the notification controller incorrectly attempts to map the trigger to a generic service named "webhook" rather than the specifically defined service instance.

Resolution

Use the below steps to correct the annotation on the Argo CD Application Object (applications.argoproj.io) : 

  1. Locate the existing subscription annotation by running  kubectl get applications.argoproj.io -n <argocd-instance-namespace> <argocd-application-name> -oyaml.
    Example of incorrect syntax: notifications.argoproj.io/subscribe.on-sync-succeeded-gitlab.webhook: gitlab-pipeline

  2. Modify the annotation key to terminate directly with the specific service instance name.
    Refer documentation link in additional information section for more . 

  3. Apply the updated configuration.
    Example for correct configuration : notifications.argoproj.io/subscribe.on-sync-succeeded-gitlab.gitlab-pipeline: ""

  4. Verify the resolution by triggering a sync and checking the notification controller logs for a successful "Sending notification" event.

Additional Information

Argo CD Subscriptions Documentation