apiVersion: v1
kind: ConfigMap
metadata:
  name: apiserver-config
  namespace: wavefront-collector
  annotations:
    wavefront.com/discovery-config: 'true'
data:
  collector.yaml: |
    plugins:
    # apiserver
    - name: apiserver
      type: prometheus
      selectors:
        # set resource type to service
        resourceType: service
        # modify service labels as relevant
        labels:
          component:
            - apiserver
          provider:
            - kubernetes
      prefix: kube.apiserver.
      scheme: https
      port: 443
      path: /metrics
      conf: |
        bearer_token_file: '/var/run/secrets/kubernetes.io/serviceaccount/token'
        tls_config:
          ca_file: '/var/run/secrets/kubernetes.io/serviceaccount/ca.crt'
          insecure_skip_verify: true
