diff --git a/jsonnet/kube-prometheus/components/k8s-control-plane.libsonnet b/jsonnet/kube-prometheus/components/k8s-control-plane.libsonnet index de4c5c93744852c25a395df808d1ef30e28c5a1a..95ceb490208262ec0cb7469e5ce42dfccc50bedc 100644 --- a/jsonnet/kube-prometheus/components/k8s-control-plane.libsonnet +++ b/jsonnet/kube-prometheus/components/k8s-control-plane.libsonnet @@ -105,6 +105,7 @@ function(params) { bearerTokenFile: '/var/run/secrets/kubernetes.io/serviceaccount/token', metricRelabelings: relabelings, relabelings: [{ + action: 'replace', sourceLabels: ['__metrics_path__'], targetLabel: 'metrics_path', }], @@ -121,6 +122,7 @@ function(params) { }, bearerTokenFile: '/var/run/secrets/kubernetes.io/serviceaccount/token', relabelings: [{ + action: 'replace', sourceLabels: ['__metrics_path__'], targetLabel: 'metrics_path', }], @@ -166,6 +168,7 @@ function(params) { tlsConfig: { insecureSkipVerify: true }, bearerTokenFile: '/var/run/secrets/kubernetes.io/serviceaccount/token', relabelings: [{ + action: 'replace', sourceLabels: ['__metrics_path__'], targetLabel: 'metrics_path', }], diff --git a/manifests/kubernetesControlPlane-serviceMonitorKubelet.yaml b/manifests/kubernetesControlPlane-serviceMonitorKubelet.yaml index 92b3d13d77efeea78409c277ed2d1e06929852ba..d0d2611f4405161501ee055f3dd027fb3eae8791 100644 --- a/manifests/kubernetesControlPlane-serviceMonitorKubelet.yaml +++ b/manifests/kubernetesControlPlane-serviceMonitorKubelet.yaml @@ -46,7 +46,8 @@ spec: - __name__ port: https-metrics relabelings: - - sourceLabels: + - action: replace + sourceLabels: - __metrics_path__ targetLabel: metrics_path scheme: https @@ -75,7 +76,8 @@ spec: path: /metrics/cadvisor port: https-metrics relabelings: - - sourceLabels: + - action: replace + sourceLabels: - __metrics_path__ targetLabel: metrics_path scheme: https @@ -87,7 +89,8 @@ spec: path: /metrics/probes port: https-metrics relabelings: - - sourceLabels: + - action: replace + sourceLabels: - __metrics_path__ targetLabel: metrics_path scheme: https