Fix serviceMonitorKubelet's metricRelabelings (#225)

Signed-off-by: Jetchko Jekov <jetchko.jekov@gmail.com>
This commit is contained in:
Jetchko Jekov authored and GitHub committed 2020-04-10 11:05:18 +03:00
1 parent 8b3acf2ded
commit ec392c3828
1 file changed
+15 -7
+15 -7
View File
@@ -27,13 +27,21 @@
prometheus+:: {
serviceMonitorKubelet+: {
spec+: {
metricRelabelings+: [
{
action: 'replace',
sourceLabels: ['node'],
targetLabel: 'instance',
},
],
endpoints: std.map(function(endpoint)
if endpoint.port == "https-metrics" then
endpoint {
metricRelabelings+: [
{
action: 'replace',
sourceLabels: ['node'],
targetLabel: 'instance',
},
],
}
else
endpoint,
super.endpoints
),
},
},
},