apiVersion: v1
kind: ConfigMap
metadata:
  name: $APP_INSTANCE_NAME-alertmanager-config
  labels:
    app.kubernetes.io/name: $APP_INSTANCE_NAME
    app.kubernetes.io/component: alertmanager
data:
  # To learn more: https://prometheus.io/docs/alerting/configuration/
  alertmanager.yml: |
    global:
      slack_api_url: "https://hooks.slack.com/services/${SLACK_KEY}"
      resolve_timeout: 20s
    route:
      group_by: ['instance', 'severity']
      group_wait: 5s
      group_interval: 10s
      repeat_interval: 1h
      receiver: slack
    receivers:
    - name: slack
      slack_configs:
      - send_resolved: true
        channel: '#alertmanager'
#    global: null
#    receivers:
#    - name: default-receiver
#    route:
#      group_interval: 5m
#      group_wait: 10s
#      receiver: default-receiver
#      repeat_interval: 3h
