-
Notifications
You must be signed in to change notification settings - Fork 140
Slack notifications not working in argo #406
Comments
This has been hitting me as well. I've also noticed that the troubleshooting for the argocd-notification controller deployed as a part of argocd doesn't work. It appears as if the subcommands aren't there as it tries to start argocd-notifications... help only shows flags
There is only one pid in the pod.. argocd-notifications pid 1. |
I'm having this problem, too
|
Hello, any updates or estimates on this fix? Thanks |
This project has moved to the main Argo CD repository which was announced in the README.md. To test the notification you now have to use following command which will print out details on success or failure.
Examples
Find more information in the official documentation: Also make sure that the template you're defining as |
Ok thanks @hebestreit Glad the documentation is updated now ;) This helped me realize I didn't have any triggers or templates set. TL;DR apiVersion: v1
kind: ConfigMap
metadata:
name: argocd-notifications-cm
data:
service.slack: |
token: $slack-token
defaultTriggers: |
- on-deployed
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'
template.app-deployed: |
message: |
{{if eq .serviceType "slack"}}:white_check_mark:{{end}} Application {{.app.metadata.name}} is now running new version of deployments manifests.
slack:
attachments: |
[{
"title": "{{ .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": "Repository",
"value": "{{.app.spec.source.repoURL}}",
"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}}
]
}] And I have notifications and the |
Just going to add that I had the same issue as GeeThree - I didn't realize that there were no default Triggers & Templates being shipped with the Notification Controller. Once I updated my helm install with the commented defaults starting here things started working as expected. 👍🏻 I think this issue could be closed. |
Summary
I followed all the steps mentioned here with an on-sync subscription method. But whenever sync is going on I can see below logs
level=info msg="Trigger on-sync-running result: []" app=argocd/grafana
in
argocd-notifications-controlle
pod.There are no notifications on slack.
I am using KOPS to manage my cluster.
I am using latest versions of argocd and notification controller
Message from the maintainers:
Impacted by this bug? Give it a 👍. We prioritise the issues with the most 👍.
The text was updated successfully, but these errors were encountered: