Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Notifications do not respect defaultTriggers #1668

Closed
jali-clarke opened this issue Nov 24, 2021 · 1 comment · Fixed by #1689
Closed

Notifications do not respect defaultTriggers #1668

jali-clarke opened this issue Nov 24, 2021 · 1 comment · Fixed by #1689
Labels
bug Something isn't working
Milestone

Comments

@jali-clarke
Copy link

Summary

Even though Argo Rollouts uses the same notification engine as Argo CD, it does not seem to respect defaultTriggers the same way that Argo CD does.

If I set the following in argo-rollouts-notification-configmap:

apiVersion: v1
kind: ConfigMap
metadata:
  name: argo-rollouts-notification-configmap
data:
  # other configs redacted

  defaultTriggers: |
    - on-rollout-completed
    - on-rollout-step-completed
    - on-rollout-updated
    - on-scaling-replica-set

and attach the following annotation to the Rollout object:

apiVersion: argoproj.io/v1alpha1
kind: Rollout
metadata:
  name: rollout-canary
  annotations:
    notifications.argoproj.io/subscribe.slack: argo-notifications
  # spec and so on redacted

I don't get any event notifications in the #argo-notifications Slack channel on e.g. completed rollout, replicaset scale up, etc.

It does work fine if I set the following annotations, however:

apiVersion: argoproj.io/v1alpha1
kind: Rollout
metadata:
  name: rollout-canary
  annotations:
      notifications.argoproj.io/subscribe.on-rollout-completed.slack: argocd-notifications
      notifications.argoproj.io/subscribe.on-rollout-step-completed.slack: argocd-notifications
      notifications.argoproj.io/subscribe.on-rollout-updated.slack: argocd-notifications
      notifications.argoproj.io/subscribe.on-scaling-replica-set.slack: argocd-notifications

This works regardless of whether defaultTriggers is configured, of course.

Diagnostics

Using quay.io/argoproj/argo-rollouts:v1.1.0

# Paste the logs from the rollout controller

time="2021-11-24T12:33:33Z" level=info msg="Start processing" resource=rollout-canary/rollout-canary
time="2021-11-24T12:33:33Z" level=info msg="Started syncing rollout" generation=4 namespace=rollout-canary resourceVersion=310075394 rollout=rollout-canary
time="2021-11-24T12:33:33Z" level=info msg="Trigger on-scaling-replica-set result: [{[0].2jmj7l5rSw0yVb_vlWAYkK_YBwk  [scaling-replicaset] false}]" resource=rollout-canary/rollout-canary
time="2021-11-24T12:33:33Z" level=info msg="Trigger on-rollout-completed result: [{[0].2jmj7l5rSw0yVb_vlWAYkK_YBwk  [rollout-completed] false}]" resource=rollout-canary/rollout-canary
time="2021-11-24T12:33:33Z" level=info msg="Trigger on-rollout-step-completed result: [{[0].2jmj7l5rSw0yVb_vlWAYkK_YBwk  [rollout-step-completed] false}]" resource=rollout-canary/rollout-canary
time="2021-11-24T12:33:33Z" level=info msg="Trigger on-rollout-updated result: [{[0].2jmj7l5rSw0yVb_vlWAYkK_YBwk  [rollout-updated] false}]" resource=rollout-canary/rollout-canary
time="2021-11-24T12:33:33Z" level=info msg="Processing completed" resource=rollout-canary/rollout-canary

Nothing out of the ordinary here, it seems.


Message from the maintainers:

Impacted by this bug? Give it a 👍. We prioritize the issues with the most 👍.

@jali-clarke jali-clarke added the bug Something isn't working label Nov 24, 2021
@huikang
Copy link
Member

huikang commented Nov 25, 2021

I guess argo-cd uses argocd-notification which contains some built-in triggers and templates. But it the defaultTriggers is unavailable by default in argo-rollouts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants