apiVersion: v1
kind: Secret
metadata:
  name: alertmanager-main
  namespace: monitoring
stringData:
  alertmanager.yaml: |-
    global:
      resolve_timeout: 5m
    route:
      receiver: Default
      group_by:
      - namespace
      routes:
      - receiver: Watchdog
        matchers:
        - alertname = Watchdog
      - receiver: "null"
        matchers:
        - alertname = InfoInhibitor
      - receiver: Critical
        matchers:
        - severity = critical
      group_wait: 30s
      group_interval: 5m
      repeat_interval: 12h
    inhibit_rules:
    - target_matchers:
      - severity =~ warning|info
      source_matchers:
      - severity = critical
      equal:
      - namespace
      - alertname
    - target_matchers:
      - severity = info
      source_matchers:
      - severity = warning
      equal:
      - namespace
      - alertname
    - target_matchers:
      - severity = info
      source_matchers:
      - alertname = InfoInhibitor
      equal:
      - namespace
    receivers:
    - name: Default
      email_configs:
      - to: Brad <brad-k8s-alerts-77rC@fewerhassles.com>
        from: Alertmanager <alertmanager@alertmanager.k8s>
        smarthost: mail.fewerhassles.com:587
        send_resolved: true
    - name: Watchdog
    - name: Critical
      email_configs:
      - to: Brad <brad-k8s-alerts-77rC@fewerhassles.com>
        from: Alertmanager <alertmanager@alertmanager.k8s>
        smarthost: mail.fewerhassles.com:587
        send_resolved: true
    - name: "null"
    templates: []
