env: prod
replicaCount: 2
nodeSelector:
  node_type: worker

image:
  repository: 577523860935.dkr.ecr.eu-central-1.amazonaws.com/third-party/prometheus/alertmanager
  tag: "v0.28.1"

ingress:
  enabled: true
  className: nginx-read

alertmanager:
  route:
    groupBy:
      - alertname
      - level
      - severity
      - priority
      - rule
      - cluster
      - tenant
      - cluster_id
    groupWait: 30s
    receiver: junkyard
    repeatInterval: 30m
    routes:
    # Pingcap Service Routes
    - receiver: customer
      repeatInterval: 3h
      groupBy: ['alertname', 'cluster_id', 'tidb_cluster_id', 'job_id', 'changefeed']
      continue: true
      matchers:
      - name: visibility
        value: external
        matchType: '='
    - receiver: pingcap
      groupBy: ['...']
      continue: true
      groupWait: 10s
      groupInterval: 10m
      repeatInterval: 2h
      matchers:
      - name: severity
        value: critical|emergency|blocker|major|warning
        matchType: '=~'
      routes:
        - receiver: pingcap-warning
          matchers:
          - name: severity
            value: warning
            matchType: '=~'
        - receiver: pingcap-major
          matchers:
          - name: severity
            value: major
            matchType: '=~'
  receivers:
  - name: junkyard
  - name: customer
    webhookConfigs:
      - httpConfig:
          basicAuth:
            password:
              key: password
              name: clinic-alert-proxy-basic-auth
            username:
              key: username
              name: clinic-alert-proxy-basic-auth
        sendResolved: true
        url: http://vpce-0303bd09f9bfa7b90-io2t8srg.vpce-svc-02085f4a5969e0430.us-west-2.vpce.amazonaws.com/api/byoc/v1/alert
  - name: pingcap
    webhookConfigs:
      - httpConfig:
          basicAuth:
            password:
              key: password
              name: clinic-alert-proxy-basic-auth
            username:
              key: username
              name: clinic-alert-proxy-basic-auth
        sendResolved: true
        url: http://vpce-0303bd09f9bfa7b90-io2t8srg.vpce-svc-02085f4a5969e0430.us-west-2.vpce.amazonaws.com/api/byoc/v1/alert
  - name: pingcap-warning
    webhookConfigs:
      - httpConfig:
          basicAuth:
            password:
              key: password
              name: clinic-alert-proxy-basic-auth
            username:
              key: username
              name: clinic-alert-proxy-basic-auth
        sendResolved: true
        url: http://vpce-0303bd09f9bfa7b90-io2t8srg.vpce-svc-02085f4a5969e0430.us-west-2.vpce.amazonaws.com/api/byoc/v1/alert
  - name: pingcap-major
    webhookConfigs:
      - httpConfig:
          basicAuth:
            password:
              key: password
              name: clinic-alert-proxy-basic-auth
            username:
              key: username
              name: clinic-alert-proxy-basic-auth
        sendResolved: true
        url: http://vpce-0303bd09f9bfa7b90-io2t8srg.vpce-svc-02085f4a5969e0430.us-west-2.vpce.amazonaws.com/api/byoc/v1/alert
  extraSecret:
    name: clinic-alert-proxy-basic-auth
    data:
      username: customer-alertmanager-1372813089208281461
      password: q5JEykCSZ7fDJZbzjzb-vw
