minor update as requested in PR
This commit is contained in:
@@ -5,7 +5,7 @@ This guide will help you monitor applications in other Namespaces. By default th
|
||||
You have to give the list of the Namespaces that you want to be able to monitor.
|
||||
This is done in the variable `prometheus.roleSpecificNamespaces`. You usually set this in your `.jsonnet` file when building the manifests.
|
||||
|
||||
Ex to create the needed `Role` and `Rolebindig` for the Namespace `foo` :
|
||||
Example to create the needed `Role` and `Rolebindig` for the Namespace `foo` :
|
||||
```
|
||||
local kp = (import 'kube-prometheus/kube-prometheus.libsonnet') + {
|
||||
_config+:: {
|
||||
|
@@ -56,7 +56,7 @@ local k = import 'ksonnet/ksonnet.beta.3/k.libsonnet';
|
||||
groups: $._config.prometheus.rules.groups,
|
||||
},
|
||||
},
|
||||
roleBindingSpecificNamespace:
|
||||
roleBindingSpecificNamespaces:
|
||||
local roleBinding = k.rbac.v1.roleBinding;
|
||||
|
||||
local newSpecificRoleBinding(namespace) =
|
||||
@@ -122,7 +122,7 @@ local k = import 'ksonnet/ksonnet.beta.3/k.libsonnet';
|
||||
clusterRoleBinding.mixin.roleRef.withName('prometheus-' + $._config.prometheus.name) +
|
||||
clusterRoleBinding.mixin.roleRef.mixinInstance({ kind: 'ClusterRole' }) +
|
||||
clusterRoleBinding.withSubjects([{ kind: 'ServiceAccount', name: 'prometheus-' + $._config.prometheus.name, namespace: $._config.namespace }]),
|
||||
roleSpecificNamespace:
|
||||
roleSpecificNamespaces:
|
||||
local role = k.rbac.v1.role;
|
||||
local policyRule = role.rulesType;
|
||||
local coreRule = policyRule.new() +
|
||||
|
Reference in New Issue
Block a user