# Please replace '{{ smtp_app_password }}' below with the URL of slack incoming hook
# before `kubectl apply -f`
apiVersion: v1
kind: Secret
metadata:
  name: alertmanager-prow
  namespace: prow-monitoring
stringData:
  alertmanager.yaml: |
    global:
      resolve_timeout: 5m
      smtp_smarthost: 'smtp.gmail.com:587'
      smtp_auth_username: ''
      smtp_auth_identity: ''
      smtp_auth_password: '{{ smtp_app_password }}'
      smtp_from: ''
      smtp_require_tls: true

    route:
      group_by: ['alertname', 'job']
      group_wait: 30s
      group_interval: 10m
      repeat_interval: 4h
      routes:
      - receiver: 'email-alerts'
        group_interval: 5m
        repeat_interval: 2h
        match_re:
          severity: 'critical|high'

    receivers:
    - name: 'email-alerts'
      email_configs:
      - to: 'chaodai+prow-alert@google.com,colew+prow-alert@google.com'
        text: '{{ template "custom_email_text" . }}'

    templates:
    - '*.tmpl'
  msg.tmpl: |
    {{ define "custom_email_text" }}{{ .CommonAnnotations.message }}{{ end }}
type: Opaque

# Please replace '{{ smtp_app_username }}' and '{{ smtp_app_password }}' below with the URL of slack incoming hook
# before `kubectl apply -f`
apiVersion: v1
kind: Secret
metadata:
  name: alertmanager-prow
  namespace: prow-monitoring
stringData:
  alertmanager.yaml: |
    global:
      resolve_timeout: 5m
      smtp_smarthost: 'smtp.gmail.com:587'
      smtp_auth_username: '{{ smtp_app_username }}'
      smtp_auth_identity: '{{ smtp_app_username }}'
      smtp_auth_password: '{{ smtp_app_password }}'
      smtp_from: '{{ smtp_app_username }}'
      smtp_require_tls: true

    route:
      group_by: ['alertname', 'job']
      group_wait: 30s
      group_interval: 10m
      repeat_interval: 4h
      receiver: 'no-op-alerts'
      routes:
      - receiver: 'email-alerts'
        group_interval: 5m
        repeat_interval: 2h
        match_re:
          severity: 'critical|high'

    receivers:
    - name: 'email-alerts'
      email_configs:
      - to: 'chaodai+prow-alert@google.com,colew+prow-alert@google.com'
        text: '{{ template "custom_email_text" . }}'
    - name: 'no-op-alerts'

    templates:
    - '*.tmpl'
  msg.tmpl: |
    {{ define "custom_email_text" }}{{ .CommonAnnotations.message }}{{ end }}
type: Opaque

Add a no op receiver as default alert receiver
Add a no op receiver as default alert receiver
