Merge pull request #380 from omerlh/prom-all-namespaces

added patch to allow prom to watch all namespaces
This commit is contained in:
Frederic Branczyk
2020-01-20 14:16:29 +01:00
committed by GitHub

View File

@@ -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]
},
}
}