Skip to content

Commit

Permalink
Merge pull request #1111 from Luis-TT/fix-windows-addon-label
Browse files Browse the repository at this point in the history
  • Loading branch information
paulfantom authored Apr 27, 2021
2 parents 9d69c4c + 419eaf2 commit 984de5f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions examples/windows.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ local kp =
namespace: 'monitoring',
},
windowsScrapeConfig+:: {
static_configs: {
static_configs: [{
targets: ['10.240.0.65:5000', '10.240.0.63:5000'],
},
}],
},
},
};
Expand Down
5 changes: 3 additions & 2 deletions jsonnet/kube-prometheus/addons/windows.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ local windowsrules = import 'kubernetes-mixin/rules/windows.libsonnet';

{
values+:: {
// This needs to follow prometheus naming convention and not prometheus-operator one
windowsScrapeConfig+:: {
job_name: 'windows-exporter',
static_configs: [
Expand All @@ -15,10 +16,10 @@ local windowsrules = import 'kubernetes-mixin/rules/windows.libsonnet';
action: 'replace',
regex: '(.*)',
replacement: '$1',
sourceLabels: [
source_labels: [
'__meta_kubernetes_endpoint_address_target_name',
],
targetLabel: 'instance',
target_label: 'instance',
},
],
},
Expand Down

0 comments on commit 984de5f

Please sign in to comment.