argo-kube-notifier
argo-kube-notifier copied to clipboard
"throttleMinutes" parameter does not seem to have any effect
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
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