Open egkelly opened 2 years ago
Out of curiosity, if you remove and app.status.health.status == 'Healthy'
from the when
block, does it work? I've been having issues with the and app.status.health.status == 'Healthy'
portion and wondering if it is the same issue.
Please check arguments passed to commandline of argocd-notifications-controller: secret-name config-map-name Is it match your config and secret name? For debug you can start notification service with loglevel debug
G'day @egkelly , I was looking an issue very similar to this and I ended up getting it to work by modifying my template.
I am curious about one thing.
The
data:
service.slack: |
token: ${var.slack_token}
reference. I know that the secret is defined in
apiVersion: v1
kind: Secret
metadata:
name: argocd-notifications-secret
stringData:
slack-token: <base64 encoded auth-token>
but I'm wondering how the configmap knows about the value of $slack-token. How does that "fetching of the value of slack-token" happen behind the scenes?
G'day @egkelly , I was looking an issue very similar to this and I ended up getting it to work by modifying my template.
I am curious about one thing.
The
data: service.slack: | token: ${var.slack_token}
reference. I know that the secret is defined in
apiVersion: v1 kind: Secret metadata: name: argocd-notifications-secret stringData: slack-token: <base64 encoded auth-token>
but I'm wondering how the configmap knows about the value of $slack-token. How does that "fetching of the value of slack-token" happen behind the scenes?
okay, so there may have been a thing in an older version of the helm-chart that did that secret bit. I think so.
Checklist:
argocd version
.Describe the bug
I've set up Slack notifications according to the documentation (with a few tweaks given the helm chart version I have deployed - 2.16.0 ), but the events I have triggers/templates set up for are not actually triggering messages to slack. I've run through all the troubleshooting and verified that
argocd admin notifications template notify app-deployed appName --recipient slack:mychannel
sends messages as expected. I have also annotated all of my applications withnotifications.argoproj.io/subscribe.on-deployed.slack: mychannel
.To Reproduce
Install argocd via helm, chart version 2.16.0. I had to update the notifications role and notifications configmap due to a few bugs in the helm chart version.
argocd-notifications-cm
argocd notifications controller role
Annotate application with
notifications.argoproj.io/subscribe.on-deployed.slack: mychannel
Test notifications by exec-ing into the notifications pod
argocd admin notifications template notify app-deployed appName --recipient slack:mychannel
Slack channel receives the message
Push a new version of the application image and deploy via ArgoCD Slack channel does not receive the message
Notifications pod logs show the following:
So far I haven't found any documentation on what the above means, though I imagine the empty brackets aren't a good sign?
Expected behavior
Message is sent to slack on deployment.
Version
ArgoCD version
5.2.0
Helm Chart Version
2.16.0