change to just json payload
This commit is contained in:
@@ -111,6 +111,8 @@ argo-cd:
|
|||||||
enabled: true
|
enabled: true
|
||||||
notifications:
|
notifications:
|
||||||
enabled: true
|
enabled: true
|
||||||
|
context:
|
||||||
|
argocdUrl: https://argocd.alexlebens.net
|
||||||
secret:
|
secret:
|
||||||
create: false
|
create: false
|
||||||
name: argocd-notifications-secret
|
name: argocd-notifications-secret
|
||||||
@@ -122,8 +124,6 @@ argo-cd:
|
|||||||
service.webhook.ntfy: |
|
service.webhook.ntfy: |
|
||||||
url: http://ntfy.ntfy/
|
url: http://ntfy.ntfy/
|
||||||
headers:
|
headers:
|
||||||
- name: Title
|
|
||||||
value: ArgoCD
|
|
||||||
- name: Authorization
|
- name: Authorization
|
||||||
value: Bearer $ntfy-token
|
value: Bearer $ntfy-token
|
||||||
livenessProbe:
|
livenessProbe:
|
||||||
@@ -147,92 +147,106 @@ argo-cd:
|
|||||||
webhook:
|
webhook:
|
||||||
ntfy:
|
ntfy:
|
||||||
method: POST
|
method: POST
|
||||||
path: argocd
|
|
||||||
headers:
|
|
||||||
- name: Priority
|
|
||||||
value: 4
|
|
||||||
body: |
|
body: |
|
||||||
Application {{.app.metadata.name}} has been created.
|
{
|
||||||
|
"topic": "argocd",
|
||||||
|
"message": "{{.app.metadata.name}} has been created.",
|
||||||
|
"title": "Created: {{.app.metadata.name}}",
|
||||||
|
"tags": ["building_construction"],
|
||||||
|
"priority": 4,
|
||||||
|
"click": "{{.context.argocdUrl}}/applications/argocd/{{.app.metadata.name}}"
|
||||||
|
}
|
||||||
template.app-deleted: |
|
template.app-deleted: |
|
||||||
webhook:
|
webhook:
|
||||||
ntfy:
|
ntfy:
|
||||||
method: POST
|
method: POST
|
||||||
path: argocd
|
|
||||||
headers:
|
|
||||||
- name: Priority
|
|
||||||
value: 4
|
|
||||||
body: |
|
body: |
|
||||||
Application {{.app.metadata.name}} has been deleted.
|
{
|
||||||
|
"topic": "argocd",
|
||||||
|
"message": "{{.app.metadata.name}} has been deleted",
|
||||||
|
"title": "Deleted: {{.app.metadata.name}}",
|
||||||
|
"tags": ["warning"],
|
||||||
|
"priority": 4,
|
||||||
|
"click": "{{.context.argocdUrl}}"
|
||||||
|
}
|
||||||
template.app-deployed: |
|
template.app-deployed: |
|
||||||
webhook:
|
webhook:
|
||||||
ntfy:
|
ntfy:
|
||||||
method: POST
|
method: POST
|
||||||
path: argocd
|
|
||||||
headers:
|
|
||||||
- name: Priority
|
|
||||||
value: 4
|
|
||||||
body: |
|
body: |
|
||||||
Application {{.app.metadata.name}} is now running new version of deployments manifests.
|
{
|
||||||
|
"topic": "argocd",
|
||||||
|
"message": "{{.app.metadata.name}} is now running new version of deployments manifests",
|
||||||
|
"title": "Deployed: {{.app.metadata.name}}",
|
||||||
|
"tags": ["+1"],
|
||||||
|
"priority": 3,
|
||||||
|
"click": "{{.context.argocdUrl}}/applications/argocd/{{.app.metadata.name}}"
|
||||||
|
}
|
||||||
template.app-health-degraded: |
|
template.app-health-degraded: |
|
||||||
webhook:
|
webhook:
|
||||||
ntfy:
|
ntfy:
|
||||||
method: POST
|
method: POST
|
||||||
path: argocd
|
|
||||||
headers:
|
|
||||||
- name: Priority
|
|
||||||
value: 5
|
|
||||||
body: |
|
body: |
|
||||||
Application {{.app.metadata.name}} has degraded.
|
{
|
||||||
Application details: {{.context.argocdUrl}}/applications/{{.app.metadata.name}}.
|
"topic": "argocd",
|
||||||
|
"message": "{{.app.metadata.name}} health has degraded",
|
||||||
|
"title": "Degraded: {{.app.metadata.name}}",
|
||||||
|
"tags": ["rotating_light"],
|
||||||
|
"priority": 5,
|
||||||
|
"click": "{{.context.argocdUrl}}/applications/argocd/{{.app.metadata.name}}"
|
||||||
|
}
|
||||||
template.app-sync-failed: |
|
template.app-sync-failed: |
|
||||||
webhook:
|
webhook:
|
||||||
ntfy:
|
ntfy:
|
||||||
method: POST
|
method: POST
|
||||||
path: argocd
|
|
||||||
headers:
|
|
||||||
- name: Priority
|
|
||||||
value: 5
|
|
||||||
body: |
|
body: |
|
||||||
The sync operation of application {{.app.metadata.name}} has failed at {{.app.status.operationState.finishedAt}} with the following error: {{.app.status.operationState.message}}
|
{
|
||||||
Sync operation details are available at: {{.context.argocdUrl}}/applications/{{.app.metadata.name}}?operation=true .
|
"topic": "argocd",
|
||||||
|
"message": "{{.app.metadata.name}} sync has failed at {{.app.status.operationState.finishedAt}} with the following error: {{.app.status.operationState.message}}",
|
||||||
|
"title": "Sync Failed: {{.app.metadata.name}}",
|
||||||
|
"tags": ["rotating_light"],
|
||||||
|
"priority": 5,
|
||||||
|
"click": "{{.context.argocdUrl}}/applications/{{.app.metadata.name}}?operation=true"
|
||||||
|
}
|
||||||
template.app-sync-running: |
|
template.app-sync-running: |
|
||||||
webhook:
|
webhook:
|
||||||
ntfy:
|
ntfy:
|
||||||
method: POST
|
method: POST
|
||||||
path: argocd
|
|
||||||
headers:
|
|
||||||
- name: Priority
|
|
||||||
value: 3
|
|
||||||
body: |
|
body: |
|
||||||
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 .
|
"topic": "argocd",
|
||||||
|
"message": "{{.app.metadata.name}} sync has started at {{.app.status.operationState.startedAt}}",
|
||||||
|
"title": "Sync Running: {{.app.metadata.name}}",
|
||||||
|
"tags": ["runner"],
|
||||||
|
"priority": 3,
|
||||||
|
"click": "{{.context.argocdUrl}}/applications/{{.app.metadata.name}}?operation=true"
|
||||||
|
}
|
||||||
template.app-sync-status-unknown: |
|
template.app-sync-status-unknown: |
|
||||||
webhook:
|
webhook:
|
||||||
ntfy:
|
ntfy:
|
||||||
method: POST
|
method: POST
|
||||||
path: argocd
|
|
||||||
headers:
|
|
||||||
- name: Priority
|
|
||||||
value: 4
|
|
||||||
body: |
|
body: |
|
||||||
{{if eq .serviceType "slack"}}:exclamation:{{end}} Application {{.app.metadata.name}} sync is 'Unknown'.
|
{
|
||||||
Application details: {{.context.argocdUrl}}/applications/{{.app.metadata.name}}.
|
"topic": "argocd",
|
||||||
{{if ne .serviceType "slack"}}
|
"message": "{{.app.metadata.name}} sync status is unknown",
|
||||||
{{range $c := .app.status.conditions}}
|
"title": "Sync Unknown: {{.app.metadata.name}}",
|
||||||
* {{$c.message}}
|
"tags": ["question"],
|
||||||
{{end}}
|
"priority": 5,
|
||||||
{{end}}
|
"click": "{{.context.argocdUrl}}/applications/{{.app.metadata.name}}"
|
||||||
|
}
|
||||||
template.app-sync-succeeded: |
|
template.app-sync-succeeded: |
|
||||||
webhook:
|
webhook:
|
||||||
ntfy:
|
ntfy:
|
||||||
method: POST
|
method: POST
|
||||||
path: argocd
|
|
||||||
headers:
|
|
||||||
- name: Priority
|
|
||||||
value: 3
|
|
||||||
body: |
|
body: |
|
||||||
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 .
|
"topic": "argocd",
|
||||||
|
"message": "{{.app.metadata.name}} has been successfully synced at {{.app.status.operationState.finishedAt}}",
|
||||||
|
"title": "Sync Succeeded: {{.app.metadata.name}}",
|
||||||
|
"tags": ["+1"],
|
||||||
|
"priority": 3,
|
||||||
|
"click": "{{.context.argocdUrl}}/applications/{{.app.metadata.name}}?operation=true"
|
||||||
|
}
|
||||||
triggers:
|
triggers:
|
||||||
trigger.on-created: |
|
trigger.on-created: |
|
||||||
- description: Application {{.app.metadata.name}} has been created.
|
- description: Application {{.app.metadata.name}} has been created.
|
||||||
|
Reference in New Issue
Block a user