Skip to content
Snippets Groups Projects
Commit d009846b authored by Vasilis Remmas's avatar Vasilis Remmas Committed by Frederic Branczyk
Browse files

Create rolebinding using $._config.namespace

Assign the rolebinding to an existing serviceaccount
parent 5a1a2f9a
No related branches found
No related tags found
No related merge requests found
...@@ -66,7 +66,7 @@ local k = import 'ksonnet/ksonnet.beta.3/k.libsonnet'; ...@@ -66,7 +66,7 @@ local k = import 'ksonnet/ksonnet.beta.3/k.libsonnet';
roleBinding.mixin.roleRef.withApiGroup('rbac.authorization.k8s.io') + roleBinding.mixin.roleRef.withApiGroup('rbac.authorization.k8s.io') +
roleBinding.mixin.roleRef.withName('prometheus-' + $._config.prometheus.name) + roleBinding.mixin.roleRef.withName('prometheus-' + $._config.prometheus.name) +
roleBinding.mixin.roleRef.mixinInstance({ kind: 'Role' }) + roleBinding.mixin.roleRef.mixinInstance({ kind: 'Role' }) +
roleBinding.withSubjects([{ kind: 'ServiceAccount', name: 'prometheus-' + $._config.prometheus.name, namespace: namespace }]); roleBinding.withSubjects([{ kind: 'ServiceAccount', name: 'prometheus-' + $._config.prometheus.name, namespace: $._config.namespace }]);
local roleBindigList = k.rbac.v1.roleBindingList; local roleBindigList = k.rbac.v1.roleBindingList;
roleBindigList.new([newSpecificRoleBinding(x) for x in $._config.prometheus.namespaces]), roleBindigList.new([newSpecificRoleBinding(x) for x in $._config.prometheus.namespaces]),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment