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

     1  {{$PROMETHEUS_SCRAPE_KUBE_PROXY := DefaultParam .PROMETHEUS_SCRAPE_KUBE_PROXY true}}
     2  
     3  {{if $PROMETHEUS_SCRAPE_KUBE_PROXY}}
     4  apiVersion: monitoring.coreos.com/v1
     5  kind: ServiceMonitor
     6  metadata:
     7    labels:
     8      k8s-app: kube-proxy
     9    name: kube-proxy
    10    namespace: monitoring
    11  spec:
    12    endpoints:
    13      # We modify interval depending on the cluster size to avoid collecting too many samples for
    14      # large clusters. Also because the tests run longer in bigger clusters we don't need to
    15      # collect them as often as in smaller clusters. We use 30s interval for small clusters
    16      # (# nodes <= 1000) and 1min interval in big clusters (# nodes > 1000)
    17      # TODO(mm4tt): Once we prove the interval works in big clusters, simplify the expression.
    18      - interval: {{MinInt 60 (MultiplyInt 30 (AddInt 1 (DivideInt .Nodes 1001)))}}s
    19        port: http-metrics
    20    jobLabel: k8s-app
    21    namespaceSelector:
    22      matchNames:
    23        - kube-system
    24    selector:
    25      matchLabels:
    26        k8s-app: kube-proxy
    27  {{end}}