This commit is contained in:
Danijel Simeunovic
2026-03-04 11:10:44 +01:00
parent bea55380d5
commit 5f99aed97a

View File

@@ -26,16 +26,8 @@ notifications:
secret:
create: false
# Configure notification service and templates
cm:
# Define Slack service using webhook URL from sealed secret
service.webhook.slack: |
url: $slack-webhook-url
headers:
- name: Content-Type
value: application/json
# Template: Application syncing
# Define notification templates
templates:
template.app-syncing: |
webhook:
slack:
@@ -44,8 +36,6 @@ notifications:
{
"text": "🔄 *{{ .app.metadata.name }}* is syncing...\n📦 Revision: {{ .app.status.sync.revision | substr 0 7 }}"
}
# Template: Sync succeeded
template.app-sync-succeeded: |
webhook:
slack:
@@ -54,8 +44,6 @@ notifications:
{
"text": "✅ *{{ .app.metadata.name }}* sync succeeded\n📦 Revision: {{ .app.status.sync.revision | substr 0 7 }}{{ range .app.status.summary.images }}\n🏷 Image: {{ . }}{{ end }}"
}
# Template: Sync failed
template.app-sync-failed: |
webhook:
slack:
@@ -64,8 +52,6 @@ notifications:
{
"text": "❌ *{{ .app.metadata.name }}* sync failed\n📦 Revision: {{ .app.status.sync.revision | substr 0 7 }}\n⚠ Message: {{ .app.status.operationState.message }}"
}
# Template: Application degraded
template.app-degraded: |
webhook:
slack:
@@ -75,22 +61,25 @@ notifications:
"text": "⚠️ *{{ .app.metadata.name }}* is degraded\n🏥 Health: {{ .app.status.health.status }}\n💬 Message: {{ .app.status.health.message }}"
}
# Trigger: Sync running
# Define notification triggers
triggers:
trigger.on-sync-running: |
- when: app.status.operationState.phase in ['Running']
send: [app-syncing]
# Trigger: Sync succeeded
trigger.on-sync-succeeded: |
- when: app.status.operationState.phase in ['Succeeded']
send: [app-sync-succeeded]
# Trigger: Sync failed
trigger.on-sync-failed: |
- when: app.status.operationState.phase in ['Failed']
send: [app-sync-failed]
# Trigger: Application degraded
trigger.on-degraded: |
- when: app.status.health.status == 'Degraded'
send: [app-degraded]
# Define notification services (webhook for Slack)
notifiers:
service.webhook.slack: |
url: $slack-webhook-url
headers:
- name: Content-Type
value: application/json