Skip to content

Commit 984de5f

Browse files
authored
Merge pull request #1111 from Luis-TT/fix-windows-addon-label
2 parents 9d69c4c + 419eaf2 commit 984de5f

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

examples/windows.jsonnet

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ local kp =
77
namespace: 'monitoring',
88
},
99
windowsScrapeConfig+:: {
10-
static_configs: {
10+
static_configs: [{
1111
targets: ['10.240.0.65:5000', '10.240.0.63:5000'],
12-
},
12+
}],
1313
},
1414
},
1515
};

jsonnet/kube-prometheus/addons/windows.libsonnet

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ local windowsrules = import 'kubernetes-mixin/rules/windows.libsonnet';
33

44
{
55
values+:: {
6+
// This needs to follow prometheus naming convention and not prometheus-operator one
67
windowsScrapeConfig+:: {
78
job_name: 'windows-exporter',
89
static_configs: [
@@ -15,10 +16,10 @@ local windowsrules = import 'kubernetes-mixin/rules/windows.libsonnet';
1516
action: 'replace',
1617
regex: '(.*)',
1718
replacement: '$1',
18-
sourceLabels: [
19+
source_labels: [
1920
'__meta_kubernetes_endpoint_address_target_name',
2021
],
21-
targetLabel: 'instance',
22+
target_label: 'instance',
2223
},
2324
],
2425
},

0 commit comments

Comments
 (0)