apiVersion: v1
kind: ConfigMap
metadata:
  name: alertmanager
data:
  alerts.yaml: |-
    receivers:
      - name: 'pager'
          # email_configs:
          # - to: 'team-X+alerts-critical@example.org'
        slack_configs:
        - channel: '#cloudmon'
          text: "{{ range .Alerts }}{{ .Annotations.description }}\n{{ end }}"
          send_resolved: True

    # The root route on which each incoming alert enters.
    route:
      receiver: pager

      # The labels by which incoming alerts are grouped together. For example,
      # multiple alerts coming in for cluster=A and alertname=LatencyHigh would
      # be batched into a single group.
      group_by: ['alertname', 'cluster' ]
