{{ define "google-chat-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 }}