Skip to content

Commit

Permalink
Merge pull request #380 from omerlh/prom-all-namespaces
Browse files Browse the repository at this point in the history
added patch to allow prom to watch all namespaces
  • Loading branch information
brancz authored Jan 20, 2020
2 parents 72ae778 + f517b35 commit 9ebe632
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions jsonnet/kube-prometheus/kube-prometheus-all-namespaces.libsonnet
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
local k = import 'ksonnet/ksonnet.beta.4/k.libsonnet';

{
prometheus+:: {
clusterRole+: {
rules+:
local role = k.rbac.v1.role;
local policyRule = role.rulesType;
local rule = policyRule.new() +
policyRule.withApiGroups(['']) +
policyRule.withResources([
'services',
'endpoints',
'pods',
]) +
policyRule.withVerbs(['get', 'list', 'watch']);
[rule]
},
}
}

0 comments on commit 9ebe632

Please sign in to comment.