diff --git a/jsonnet/kube-prometheus/kube-prometheus-all-namespaces.libsonnet b/jsonnet/kube-prometheus/kube-prometheus-all-namespaces.libsonnet new file mode 100644 index 0000000000000000000000000000000000000000..468420fd1f636d7fd237769c82eebc56962adaf3 --- /dev/null +++ b/jsonnet/kube-prometheus/kube-prometheus-all-namespaces.libsonnet @@ -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] + }, + } +} \ No newline at end of file