k8s.io/perf-tests/clusterloader2@v0.0.0-20240304094227-64bdb12da87e/pkg/prometheus/manifests/default/prometheus-serviceMonitorKubelet.yaml (about)

     1  {{$PROMETHEUS_SCRAPE_KUBELETS := DefaultParam .PROMETHEUS_SCRAPE_KUBELETS false}}
     2  
     3  {{if $PROMETHEUS_SCRAPE_KUBELETS}}
     4  apiVersion: monitoring.coreos.com/v1
     5  kind: ServiceMonitor
     6  metadata:
     7    labels:
     8      k8s-app: kubelet
     9    name: kubelet
    10    namespace: monitoring
    11  spec:
    12    jobLabel: k8s-app
    13    endpoints:
    14    - port: https-metrics
    15      scheme: https
    16      interval: 30s
    17      tlsConfig:
    18        insecureSkipVerify: true
    19      bearerTokenFile: /var/run/secrets/kubernetes.io/serviceaccount/token
    20    - port: https-metrics
    21      scheme: https
    22      path: /metrics/cadvisor
    23      interval: 30s
    24      honorLabels: true
    25      tlsConfig:
    26        insecureSkipVerify: true
    27      bearerTokenFile: /var/run/secrets/kubernetes.io/serviceaccount/token
    28      metricRelabelings:
    29        - sourceLabels: [ namespace ]
    30          regex: 'test-.*'
    31          action: drop
    32    selector:
    33      matchLabels:
    34        k8s-app: kubelet
    35    namespaceSelector:
    36      matchNames:
    37      - kube-system
    38  {{end}}