---
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
  labels:
    app.kubernetes.io/component: alerting
  name: alertmanager
spec:
  endpoints:
    - interval: 30s
      port: web
      relabelings:
        - action: replace
          regex: (.*)
          replacement: $1
          sourceLabels:
            - __meta_kubernetes_pod_name
          targetLabel: instance
    - interval: 30s
      port: reloader-web
      relabelings:
        - action: replace
          regex: (.*)
          replacement: $1
          sourceLabels:
            - __meta_kubernetes_pod_name
          targetLabel: instance
  selector:
    matchLabels:
      app.kubernetes.io/component: alerting
