Skip to content

Commit

Permalink
Stabilize on-deployed notification trigger (#21333)
Browse files Browse the repository at this point in the history
Signed-off-by: Siddhesh Ghadi <[email protected]>
  • Loading branch information
svghadi authored Dec 30, 2024
1 parent 635e592 commit 9309688
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion notifications_catalog/install.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -491,7 +491,7 @@ data:
send:
- app-deployed
when: app.status.operationState != nil and app.status.operationState.phase in ['Succeeded']
and app.status.health.status == 'Healthy'
and app.status.health.status == 'Healthy' and !time.Parse(app.status.health.lastTransitionTime).Before(time.Parse(app.status.operationState.finishedAt))
trigger.on-health-degraded: |
- description: Application has degraded
send:
Expand Down
2 changes: 1 addition & 1 deletion notifications_catalog/triggers/on-deployed.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
- when: app.status.operationState != nil and app.status.operationState.phase in ['Succeeded'] and app.status.health.status == 'Healthy'
- when: app.status.operationState != nil and app.status.operationState.phase in ['Succeeded'] and app.status.health.status == 'Healthy' and !time.Parse(app.status.health.lastTransitionTime).Before(time.Parse(app.status.operationState.finishedAt))
description: Application is synced and healthy. Triggered once per commit.
send: [app-deployed]
oncePer: app.status.operationState?.syncResult?.revision

0 comments on commit 9309688

Please sign in to comment.