change
This commit is contained in:
@@ -72,13 +72,45 @@ notifications:
|
||||
starttls: true
|
||||
|
||||
templates:
|
||||
app-sync-failed: |
|
||||
email:
|
||||
subject: Failed to sync application {{.app.metadata.name}}.
|
||||
message: |
|
||||
The sync of {{.app.metadata.name}} failed at {{.app.status.operationState.finishedAt}}.
|
||||
Error: {{.app.status.operationState.message}}
|
||||
More details: {{.context.argocdUrl}}/applications/{{.app.metadata.name}}?operation=true
|
||||
template.app-deployed: |
|
||||
email:
|
||||
subject: New version of an application {{.app.metadata.name}} is up and running.
|
||||
message: |
|
||||
{{if eq .serviceType "slack"}}:white_check_mark:{{end}} Application {{.app.metadata.name}} is now running new version of deployments manifests.
|
||||
template.app-health-degraded: |
|
||||
email:
|
||||
subject: Application {{.app.metadata.name}} has degraded.
|
||||
message: |
|
||||
{{if eq .serviceType "slack"}}:exclamation:{{end}} Application {{.app.metadata.name}} has degraded.
|
||||
Application details: {{.context.argocdUrl}}/applications/{{.app.metadata.name}}.
|
||||
template.app-sync-failed: |
|
||||
email:
|
||||
subject: Failed to sync application {{.app.metadata.name}}.
|
||||
message: |
|
||||
The sync operation of application {{.app.metadata.name}} has failed at {{.app.status.operationState.finishedAt}} with the following error: {{.app.status.operationState.message}}
|
||||
template.app-sync-running: |
|
||||
email:
|
||||
subject: Start syncing application {{.app.metadata.name}}.
|
||||
message: |
|
||||
The sync operation of application {{.app.metadata.name}} has started at {{.app.status.operationState.startedAt}}.
|
||||
Sync operation details are available at: {{.context.argocdUrl}}/applications/{{.app.metadata.name}}?operation=true .
|
||||
template.app-sync-status-unknown: |
|
||||
email:
|
||||
subject: Application {{.app.metadata.name}} sync status is 'Unknown'
|
||||
message: |
|
||||
{{if eq .serviceType "slack"}}:exclamation:{{end}} Application {{.app.metadata.name}} sync is 'Unknown'.
|
||||
Application details: {{.context.argocdUrl}}/applications/{{.app.metadata.name}}.
|
||||
{{if ne .serviceType "slack"}}
|
||||
{{range $c := .app.status.conditions}}
|
||||
* {{$c.message}}
|
||||
{{end}}
|
||||
{{end}}
|
||||
template.app-sync-succeeded: |
|
||||
email:
|
||||
subject: Application {{.app.metadata.name}} has been successfully synced.
|
||||
message: |
|
||||
{{if eq .serviceType "slack"}}:white_check_mark:{{end}} Application {{.app.metadata.name}} has been successfully synced at {{.app.status.operationState.finishedAt}}.
|
||||
Sync operation details are available at: {{.context.argocdUrl}}/applications/{{.app.metadata.name}}?operation=true .
|
||||
|
||||
triggers:
|
||||
trigger.on-sync-failed: |
|
||||
@@ -86,12 +118,41 @@ notifications:
|
||||
send:
|
||||
- app-sync-failed
|
||||
when: app.status.operationState != nil and app.status.operationState.phase in ['Error','Failed']
|
||||
trigger.on-deployed: |
|
||||
- description: Application is synced and healthy. Triggered once per commit.
|
||||
oncePer: app.status.sync.revision
|
||||
send:
|
||||
- app-deployed
|
||||
when: app.status.operationState.phase in ['Succeeded'] and app.status.health.status == 'Healthy'
|
||||
trigger.on-health-degraded: |
|
||||
- description: Application has degraded
|
||||
send:
|
||||
- app-health-degraded
|
||||
when: app.status.health.status == 'Degraded'
|
||||
trigger.on-sync-running: |
|
||||
- description: Application is being synced
|
||||
send:
|
||||
- app-sync-running
|
||||
when: app.status.operationState.phase in ['Running']
|
||||
trigger.on-sync-status-unknown: |
|
||||
- description: Application status is 'Unknown'
|
||||
send:
|
||||
- app-sync-status-unknown
|
||||
when: app.status.sync.status == 'Unknown'
|
||||
trigger.on-sync-succeeded: |
|
||||
- description: Application syncing has succeeded
|
||||
send:
|
||||
- app-sync-succeeded
|
||||
when: app.status.operationState.phase in ['Succeeded']
|
||||
|
||||
subscriptions:
|
||||
- recipients:
|
||||
- email:admin@allarddcs.nl
|
||||
triggers:
|
||||
- on-sync-failed
|
||||
|
||||
- on-sync-status-unknown
|
||||
- on-sync-succeeded
|
||||
- app-health-degraded
|
||||
context:
|
||||
argocdUrl: https://argocd-dev.allarddcs.nl
|
||||
|
||||
|
||||
Reference in New Issue
Block a user