-
Notifications
You must be signed in to change notification settings - Fork 6.4k
Description
Summary
Currently there is no way to notify on a certain health status being active longer than a set period of time. I propose to add a lastUpdateTime
timestamp to app.status.health
indicating how long the current status is active for.
Motivation
Since an Application with an erroneous configuration might be Progressing
forever, I want to be able to leverage ArgoCD notifications to solve this issue. Currently the only workaround I'm aware (Slack discussion) of is to cross reference app.status.operationState.startedAt
and app.status.health.status
like this:
trigger.on-progressing-stuck: |
- description: Application stuck progressing
send:
- app-stuck-progressing
when: app.status.health.status == 'Progressing'
and time.Now().Sub(time.Parse(app.status.operationState.startedAt)).Minutes() > 60 and time.Now().Sub(time.Parse(app.status.operationState.startedAt)).Minutes() < 62
which is prone to over-alerting as it triggers any instance of Progressing
within this time span. So it's impossible to distinguish bad timing of a pod eviction from an app actually stuck on Progressing
Proposal
The lastUpdateTime
field should be added to the respective struct and be set to the current time when the status changes.
I'm happy to take on the implementation.