1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

Fix serviceMonitorKubelet's metricRelabelings

Insert the metricRelabelings at the proper level.

Signed-off-by: Jetchko Jekov <jetchko.jekov@gmail.com>
This commit is contained in:
Jetchko Jekov 2020-04-07 08:50:43 +02:00
parent f23da9ccad
commit 81449209a5

View File

@ -27,6 +27,9 @@
prometheus+:: { prometheus+:: {
serviceMonitorKubelet+: { serviceMonitorKubelet+: {
spec+: { spec+: {
endpoints: std.map(function(endpoint)
if endpoint.port == "https-metrics" then
endpoint {
metricRelabelings+: [ metricRelabelings+: [
{ {
action: 'replace', action: 'replace',
@ -34,6 +37,11 @@
targetLabel: 'instance', targetLabel: 'instance',
}, },
], ],
}
else
endpoint,
super.endpoints
),
}, },
}, },
}, },