github.com/argoproj/argo-cd/v2@v2.10.9/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": "Repository",
    20              "value": "{{.app.spec.source.repoURL}}",
    21              "short": true
    22            }
    23            {{range $index, $c := .app.status.conditions}}
    24            {{if not $index}},{{end}}
    25            {{if $index}},{{end}}
    26            {
    27              "title": "{{$c.type}}",
    28              "value": "{{$c.message}}",
    29              "short": true
    30            }
    31            {{end}}
    32            ]
    33          }]
    34  teams:
    35      themeColor: "#FF0000"
    36      title: Application {{.app.metadata.name}} has degraded.
    37      facts: |
    38          [{
    39            "name": "Health Status",
    40            "value": "{{.app.status.health.status}}"
    41          },
    42          {
    43            "name": "Repository",
    44            "value": "{{.app.spec.source.repoURL}}"
    45          }
    46          {{range $index, $c := .app.status.conditions}}
    47            {{if not $index}},{{end}}
    48            {{if $index}},{{end}}
    49            {
    50              "name": "{{$c.type}}",
    51              "value": "{{$c.message}}"
    52            }
    53          {{end}}
    54          ]
    55      potentialAction: |
    56          [{
    57            "@type":"OpenUri",
    58            "name":"Open Application",
    59            "targets":[{
    60              "os":"default",
    61              "uri":"{{.context.argocdUrl}}/applications/{{.app.metadata.name}}"
    62            }]
    63          },
    64          {
    65            "@type":"OpenUri",
    66            "name":"Open Repository",
    67            "targets":[{
    68              "os":"default",
    69              "uri":"{{.app.spec.source.repoURL | call .repo.RepoURLToHTTPS}}"
    70            }]
    71          }]