Fix serviceMonitorKubelet's metricRelabelings (#225)

Signed-off-by: Jetchko Jekov <jetchko.jekov@gmail.com>
Signed-off-by: Cody Belcher <cody.t.belcher@gmail.com>
This commit is contained in:
Jetchko Jekov authored and Cody Belcher committed 2020-04-16 11:23:41 -05:00
1 parent 79f720904f
commit 1b1f3b5831
1 file changed
+8
+8
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
),
}, },
}, },
}, },