apiVersion: v1
kind: Secret
metadata:
  labels:
    alertmanager: main
    app.kubernetes.io/component: alert-router
    app.kubernetes.io/name: alertmanager
    app.kubernetes.io/part-of: kube-prometheus
    app.kubernetes.io/version: 0.22.2
  name: alertmanager-main
  namespace: monitoring
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
      email_configs:
      - to: felipe.espinoza.r@uchile.cl
        from: no-reply@eol.uchile.cl
        smarthost: mtaprod.uchile.cl:25
        require_tls: false
      webhook_configs:
      - url: 'http://discord:9094'
    route:
      group_by:
      - namespace
      group_interval: 5m
      group_wait: 30s
      receiver: Default
      repeat_interval: 12h
      routes:
      - match:
          alertname: Watchdog
        receiver: Watchdog
      - match:
          severity: critical
        receiver: Critical
type: Opaque
