apiVersion: mission-control.flanksource.com/v1
kind: Notification
metadata:
name: podcrashlooping-alerts
namespace: default
spec:
events:
- config.unhealthy
filter: config.type == 'Kubernetes::Pod' && config.status == 'CrashLoopBackOff'
title: "Pod {{.config.name}} in namespace {{.config.tags.namespace}} is in CrashLoopBackOff"
template: |
{{.config.tags.namespace}}/{{.config.name}}
## Reason
{{.config.config | jq '.status.containerStatuses[0].state.waiting.message' }}
{{range $k, $v := .config.config.metadata.labels}}
**{{$k}}**: {{$v}}
{{end}}
to:
email: [email protected]