---
apiVersion: v1
kind: Secret
metadata:
  name: alertmanager-demo
  namespace: monitoring
type: Opaque
stringData:
  alertmanager.yaml: |-
    global:
      resolve_timeout: 5m
    route:
      group_by:
      - cluster
      - alertname
      group_wait: 30s
      group_interval: 5m
      repeat_interval: 12h
      receiver: slack-notifications
      routes:
      - receiver: slack-notifications
        match:
          severity: warning
    receivers:
    - name: slack-notifications
      slack_configs:
      - channel: "#alerts"
        send_resolved: true
        api_url: https://hooks.slack.com/services/<id>
        title: "[Alert] {{ .GroupLabels.alertname }}"
        text: "{{ range .Alerts }}{{ .Annotations.message }}\n{{ end }}"
