The argocd-notifications-controller controller on-delete trigger logs an empty result and never triggers the webhook templated. However, I can see a successful true result if manually triggered via argcd cli.
To Reproduce
1) Create/apply the on-delete trigger and template (I'm using webhook). Refer to notifications_catalog examples.
2) Create/apply an Application that subscribes to the on-delete trigger
3) Use argocd cli to manually verify that the trigger returns false, as expected:
argocd admin notifications trigger run on-deleted <app-name>
CONDITION RESULT
app.metadata.deletionTimestamp != nil false
4) Delete the app (add the metadata.deletionTimestamp field)
5) Use argocd cli to again manually run the trigger and see the result is now true
argocd admin notifications trigger run on-deleted <app-name>
CONDITION RESULT
app.metadata.deletionTimestamp != nil true
6) Bug: Tail the argocd-notifications-controller logs, you'll see the on-delete trigger always has an empty result:
Expected behavior
The on-delete trigger should fire with a successful result and trigger the webhook template. Also, the info level logs should show the results of the app.metadata.deletionTimestamp != nil
Checklist:
argocd version
.Describe the bug
The
argocd-notifications-controller
controller on-delete trigger logs an empty result and never triggers the webhook templated. However, I can see a successfultrue
result if manually triggered via argcd cli.To Reproduce
1) Create/apply the on-delete trigger and template (I'm using webhook). Refer to notifications_catalog examples.
My configuration
Template: ```yaml template.app-deleted: | webhook: mywebhook: method: POST path: /argo-hooks body: | { "description": "Application is deleted.", "klipenvId": "{{.app.metadata.name}}", "event": "app_deleted", "url": "{{.context.argocdUrl}}/applications/{{.app.metadata.name}}", "context": "continuous-delivery/{{.app.metadata.name}}" ```2) Create/apply an Application that subscribes to the
on-delete
trigger 3) Use argocd cli to manually verify that the trigger returnsfalse
, as expected:4) Delete the app (add the
metadata.deletionTimestamp
field) 5) Use argocd cli to again manually run the trigger and see the result is nowtrue
6) Bug: Tail the
argocd-notifications-controller
logs, you'll see theon-delete
trigger always has an empty result:Expected behavior The on-delete trigger should fire with a successful result and trigger the webhook template. Also, the info level logs should show the results of the
app.metadata.deletionTimestamp != nil
Version