Skip to content

Commit ec56f45

Browse files
Improve ArgoCD support (#2041)
* Improve ArgoCD support Signed-off-by: Fran Sanjuán <[email protected]> * Add modified yamls Signed-off-by: Fran Sanjuán <[email protected]> --------- Signed-off-by: Fran Sanjuán <[email protected]>
1 parent aac1dcf commit ec56f45

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

jsonnet/kube-prometheus/components/k8s-control-plane.libsonnet

+3
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ function(params) {
105105
bearerTokenFile: '/var/run/secrets/kubernetes.io/serviceaccount/token',
106106
metricRelabelings: relabelings,
107107
relabelings: [{
108+
action: 'replace',
108109
sourceLabels: ['__metrics_path__'],
109110
targetLabel: 'metrics_path',
110111
}],
@@ -121,6 +122,7 @@ function(params) {
121122
},
122123
bearerTokenFile: '/var/run/secrets/kubernetes.io/serviceaccount/token',
123124
relabelings: [{
125+
action: 'replace',
124126
sourceLabels: ['__metrics_path__'],
125127
targetLabel: 'metrics_path',
126128
}],
@@ -166,6 +168,7 @@ function(params) {
166168
tlsConfig: { insecureSkipVerify: true },
167169
bearerTokenFile: '/var/run/secrets/kubernetes.io/serviceaccount/token',
168170
relabelings: [{
171+
action: 'replace',
169172
sourceLabels: ['__metrics_path__'],
170173
targetLabel: 'metrics_path',
171174
}],

manifests/kubernetesControlPlane-serviceMonitorKubelet.yaml

+6-3
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@ spec:
4646
- __name__
4747
port: https-metrics
4848
relabelings:
49-
- sourceLabels:
49+
- action: replace
50+
sourceLabels:
5051
- __metrics_path__
5152
targetLabel: metrics_path
5253
scheme: https
@@ -75,7 +76,8 @@ spec:
7576
path: /metrics/cadvisor
7677
port: https-metrics
7778
relabelings:
78-
- sourceLabels:
79+
- action: replace
80+
sourceLabels:
7981
- __metrics_path__
8082
targetLabel: metrics_path
8183
scheme: https
@@ -87,7 +89,8 @@ spec:
8789
path: /metrics/probes
8890
port: https-metrics
8991
relabelings:
90-
- sourceLabels:
92+
- action: replace
93+
sourceLabels:
9194
- __metrics_path__
9295
targetLabel: metrics_path
9396
scheme: https

0 commit comments

Comments
 (0)