26 lines
648 B
Cheetah
26 lines
648 B
Cheetah
{{ define "gchat-body-template" -}}
|
|
{{- $alerts := .Alerts }}
|
|
{{- if not $alerts }}{{ $alerts = . }}{{ end }}
|
|
|
|
{{- range $alerts }}
|
|
๐จ *{{ index .Labels "alertname" }}* ({{ .Status }})
|
|
|
|
{{- with index .Labels "pod" }}
|
|
๐ข๏ธ Pod: `{{ . }}`
|
|
{{- end }}
|
|
{{- with index .Labels "container" }}
|
|
๐ฆ Container: `{{ . }}`
|
|
{{- end }}
|
|
{{- with index .Labels "stage" }}
|
|
๐งช Stage: `{{ . }}`
|
|
{{- end }}
|
|
{{- with index .Labels "cluster" }}
|
|
๐ K8s cluster: `{{ . }}`
|
|
{{- end }}
|
|
|
|
๐ {{ with index .Annotations "summary" }}{{ . }}{{ else }}n/a{{ end }}
|
|
๐ {{ with index .Annotations "description" }}{{ . }}{{ else }}n/a{{ end }}
|
|
|
|
{{ end -}}
|
|
{{ end }}
|
|
|