apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
  labels:
    endpoint: federate
    k8s-app: telemeter-server
  name: telemeter-server-federate
  namespace: telemeter
spec:
  endpoints:
  - bearerTokenFile: /var/run/secrets/kubernetes.io/serviceaccount/token
    honorLabels: true
    interval: 15s
    params:
      match[]:
      - '{__name__=~".*"}'
    path: /federate
    port: internal
    scheme: https
    tlsConfig:
      caFile: /var/run/secrets/kubernetes.io/serviceaccount/service-ca.crt
      serverName: telemeter-server.telemeter.svc
  jobLabel: k8s-app
  selector:
    matchLabels:
      k8s-app: telemeter-server
