mirror of
https://github.com/argoproj/argo-cd
synced 2026-04-21 17:07:16 +00:00
73 lines
2.8 KiB
YAML
73 lines
2.8 KiB
YAML
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}}
|
|
email:
|
|
subject: Application {{.app.metadata.name}} sync status is 'Unknown'
|
|
slack:
|
|
attachments: |
|
|
[{
|
|
"title": "{{ .app.metadata.name}}",
|
|
"title_link":"{{.context.argocdUrl}}/applications/{{.app.metadata.name}}",
|
|
"color": "#E96D76",
|
|
"fields": [
|
|
{
|
|
"title": "Sync Status",
|
|
"value": "{{.app.status.sync.status}}",
|
|
"short": true
|
|
},
|
|
{
|
|
"title": {{- if .app.spec.source }} "Repository" {{- else if .app.spec.sources }} "Repositories" {{- end }},
|
|
"value": {{- if .app.spec.source }} ":arrow_heading_up: {{ .app.spec.source.repoURL }}" {{- else if .app.spec.sources }} "{{- range $index, $source := .app.spec.sources }}{{ if $index }}\n{{ end }}:arrow_heading_up: {{ $source.repoURL }}{{- end }}" {{- end }},
|
|
"short": true
|
|
}
|
|
{{range $index, $c := .app.status.conditions}}
|
|
,
|
|
{
|
|
"title": "{{$c.type}}",
|
|
"value": "{{$c.message}}",
|
|
"short": true
|
|
}
|
|
{{end}}
|
|
]
|
|
}]
|
|
teams:
|
|
title: Application {{.app.metadata.name}} sync status is 'Unknown'
|
|
facts: |
|
|
[{
|
|
"name": "Sync Status",
|
|
"value": "{{.app.status.sync.status}}"
|
|
},
|
|
{
|
|
"name": {{- if .app.spec.source }} "Repository" {{- else if .app.spec.sources }} "Repositories" {{- end }},
|
|
"value": {{- if .app.spec.source }} "⬆️ {{ .app.spec.source.repoURL }}" {{- else if .app.spec.sources }} "{{- range $index, $source := .app.spec.sources }}{{ if $index }}\n{{ end }}⬆️ {{ $source.repoURL }}{{- end }}" {{- end }}
|
|
}
|
|
{{range $index, $c := .app.status.conditions}}
|
|
,
|
|
{
|
|
"name": "{{$c.type}}",
|
|
"value": "{{$c.message}}"
|
|
}
|
|
{{end}}
|
|
]
|
|
potentialAction: |
|
|
[{
|
|
"@type":"OpenUri",
|
|
"name":"Open Application",
|
|
"targets":[{
|
|
"os":"default",
|
|
"uri":"{{.context.argocdUrl}}/applications/{{.app.metadata.name}}"
|
|
}]
|
|
},
|
|
{
|
|
"@type":"OpenUri",
|
|
"name":"Open Repository",
|
|
"targets":[{
|
|
"os":"default",
|
|
"uri":{{- if .app.spec.source }} "⬆️ {{ .app.spec.source.repoURL }}" {{- else if .app.spec.sources }} "{{- range $index, $source := .app.spec.sources }}{{ if $index }}\n{{ end }}⬆️ {{ $source.repoURL }}{{- end }}" {{- end }}
|
|
}]
|
|
}]
|