github.com/argoproj/argo-cd/v3@v3.2.1/notifications_catalog/templates/app-health-degraded.yaml (about)

     1  message: |
     2      {{if eq .serviceType "slack"}}:exclamation:{{end}} Application {{.app.metadata.name}} has degraded.
     3      Application details: {{.context.argocdUrl}}/applications/{{.app.metadata.name}}.
     4  email:
     5      subject: Application {{.app.metadata.name}} has degraded.
     6  slack:
     7      attachments: |
     8          [{
     9            "title": "{{ .app.metadata.name}}",
    10            "title_link": "{{.context.argocdUrl}}/applications/{{.app.metadata.name}}",
    11            "color": "#f4c030",
    12            "fields": [
    13            {
    14              "title": "Health Status",
    15              "value": "{{.app.status.health.status}}",
    16              "short": true
    17            },
    18            {
    19              "title": {{- if .app.spec.source }} "Repository" {{- else if .app.spec.sources }} "Repositories" {{- end }},
    20              "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 }},
    21              "short": true
    22            }
    23            {{range $index, $c := .app.status.conditions}}
    24            ,
    25            {
    26              "title": "{{$c.type}}",
    27              "value": "{{$c.message}}",
    28              "short": true
    29            }
    30            {{end}}
    31            ]
    32          }]
    33  teams:
    34      themeColor: "#FF0000"
    35      title: Application {{.app.metadata.name}} has degraded.
    36      facts: |
    37          [{
    38            "name": "Health Status",
    39            "value": "{{.app.status.health.status}}"
    40          },
    41          {
    42            "name": {{- if .app.spec.source }} "Repository" {{- else if .app.spec.sources }} "Repositories" {{- end }},
    43            "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 }}
    44          }
    45          {{range $index, $c := .app.status.conditions}}
    46            ,
    47            {
    48              "name": "{{$c.type}}",
    49              "value": "{{$c.message}}"
    50            }
    51          {{end}}
    52          ]
    53      potentialAction: |
    54          [{
    55            "@type":"OpenUri",
    56            "name":"Open Application",
    57            "targets":[{
    58              "os":"default",
    59              "uri":"{{.context.argocdUrl}}/applications/{{.app.metadata.name}}"
    60            }]
    61          },
    62          {
    63            "@type":"OpenUri",
    64            "name":"Open Repository",
    65            "targets":[{
    66              "os":"default",
    67              "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 }}
    68            }]
    69          }]