apiVersion: v1
kind: Secret
metadata:
  name: alertmanager-{{ include "alertmanager.fullname" . }}
stringData:
  alertmanager.yaml: |-
    "global":
      "resolve_timeout": "5m"
    "inhibit_rules":
    - "equal":
      - "namespace"
      - "alertname"
      "source_match":
        "severity": "critical"
      "target_match_re":
        "severity": "warning|info"
    - "equal":
      - "namespace"
      - "alertname"
      "source_match":
        "severity": "warning"
      "target_match_re":
        "severity": "info"
    "receivers":
    - "name": "Default"
    - "name": "Watchdog"
    - "name": "Critical"
      "webhook_configs":
       - "url": "http://{{ .Values.clusterHost }}:30089/webhook"
    - "name": "webhook"
      "webhook_configs":
       - "url": "http://{{ .Values.clusterHost }}:30089/webhook"
    "route":
      "group_by": ['alertname', 'service', 'clusterId']
      "group_interval": "5m"
      "group_wait": "30s"
      "receiver": "webhook"
      "repeat_interval": "12h"
      "routes":
      - "match":
          "severity": "critical"
        "receiver": "Critical"
type: Opaque