apiVersion: v1
kind: ConfigMap
metadata:
  name: alertmanager-rules-team-x
  labels:
    findme: "yea"
data:
 alertmanager-route: |
   - match_re:
      service: ^(foo1|foo2|baz)$
     receiver: team-X-mails

    # The service has a sub-route for critical alerts, any alerts
    # that do not match, i.e. severity != critical, fall-back to the
    # parent node and are sent to 'team-X-mails'
     routes:
     - match:
        severity: critical
       receiver: team-X-pager

 alertmanager-receivers: |
    - name: 'team-X-mails'
      email_configs:
      - to: 'team-X+alerts@example.org'

    - name: 'team-X-pager'
      email_configs:
      - to: 'team-X+alerts-critical@example.org'
      pagerduty_configs:
      - service_key: <team-X-key>

    - name: 'team-X-hipchat'
      hipchat_configs:
      - auth_token: <auth_token>
        room_id: 85
        message_format: html
        notify: true
