diff --git a/notifications_catalog/install.yaml b/notifications_catalog/install.yaml index 94ff883571..120d053a8d 100644 --- a/notifications_catalog/install.yaml +++ b/notifications_catalog/install.yaml @@ -491,8 +491,8 @@ data: send: - app-deployed 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).Add(1 - * time.Minute).Before(time.Parse(app.status.operationState.finishedAt)) + and app.status.health.status == 'Healthy' and (!time.Parse(app.status.health.lastTransitionTime).Add(1 + * time.Minute).Before(time.Parse(app.status.operationState.finishedAt)) or time.Parse(app.status.health.lastTransitionTime).Before(time.Parse(app.status.operationState.startedAt))) trigger.on-health-degraded: | - description: Application has degraded oncePer: app.status.operationState?.syncResult?.revision diff --git a/notifications_catalog/triggers/on-deployed.yaml b/notifications_catalog/triggers/on-deployed.yaml index 2b2d44ea9b..6fa6dbc328 100644 --- a/notifications_catalog/triggers/on-deployed.yaml +++ b/notifications_catalog/triggers/on-deployed.yaml @@ -1,4 +1,4 @@ -- 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).Add(1 * time.Minute).Before(time.Parse(app.status.operationState.finishedAt)) +- 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).Add(1 * time.Minute).Before(time.Parse(app.status.operationState.finishedAt)) or time.Parse(app.status.health.lastTransitionTime).Before(time.Parse(app.status.operationState.startedAt))) description: Application is synced and healthy. Triggered once per commit. send: [app-deployed] oncePer: app.status.operationState?.syncResult?.revision