argo-kube-notifier icon indicating copy to clipboard operation
argo-kube-notifier copied to clipboard

"throttleMinutes" parameter does not seem to have any effect

Open tiej-dr opened this issue 4 years ago • 1 comments

Describe the bug The "throttleMinutes" parameter does not seem to have any effect. A notification is send every time condition is met (once every minute or so), even though throttleMinutes is set to e.g 10 minutes.

To Reproduce Steps to reproduce the behavior: Apply notification where condition will always be true, with throttleMinutes: 10 - Example:

apiVersion: argoproj.io/v1alpha1
kind: Notification
metadata:
  name: "dummy-notification"
  namespace: placeholder
spec:
  Namespace: placeholder
  monitorResource:
    Resource: pods
    Version: v1
  rules:
  - allConditions:
    - jsonPath: metadata/name
      operator: ne
      value: badName
    events:
        -
          message: |
            Dummy notification
          notificationLevel: info
          notifierNames:
            - slack
    name: "dummy-notification"
    initialDelaySec: 1
    throttleMinutes: 10
  notifiers:
  - name: slack
    slack:
      channel: placeholder
      hookUrlSecret:
        key: hookURL
        name: webhook-server-secret

Expected behavior When condition is met, notification should be send once after 1 sec (initialDelaySec: 1), but only if no simular notification is send within last 10 min (throttleMinutes)

Screenshots

Desktop (please complete the following information):

Smartphone (please complete the following information):

Additional context

tiej-dr avatar May 13 '20 07:05 tiej-dr

Any update on this? Does the controller actually update the notification's status lastTriggered field? Doesn't seem like any status fields are getting updated nor do I see the code that's meant to do that. Any pointers would be much appreciated

aweis89 avatar Feb 18 '21 23:02 aweis89