apiVersion: v1
kind: ConfigMap
metadata:
  labels:
    component: "server"
    app: prometheus
  name: prometheus-server
  namespace: monitoring
data:
  prometheus.yml: |
    global:
      evaluation_interval: 1m
      scrape_interval: 10s
      scrape_timeout: 10s
    scrape_configs:
    - honor_labels: true
      job_name: 'kuma-dataplanes'
      relabel_configs:
        - source_labels:
          - __meta_kuma_label_k8s_kuma_io_name
          regex: "(.*)"
          target_label: pod
        - source_labels:
          - __meta_kuma_label_k8s_kuma_io_namespace
          regex: "(.*)"
          target_label: namespace
        - source_labels:
          - __meta_kuma_label_app
          regex: "(.*)"
          target_label: app
        - source_labels:
          - __meta_kuma_label_version
          regex: "(.*)"
          target_label: app_version
        - source_labels:
          - __meta_kuma_mesh
          regex: "(.*)"
          target_label: mesh
      kuma_sd_configs:
      - server: "http://kuma-control-plane.kuma-system.svc:5676"
