From d009846be9c978b300d91ab35bc94e8d634fe261 Mon Sep 17 00:00:00 2001
From: Vasilis Remmas <vasremm@gmail.com>
Date: Wed, 1 Aug 2018 19:40:49 +0200
Subject: [PATCH] Create rolebinding using $._config.namespace

Assign the rolebinding to an existing serviceaccount
---
 jsonnet/kube-prometheus/prometheus/prometheus.libsonnet | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/jsonnet/kube-prometheus/prometheus/prometheus.libsonnet b/jsonnet/kube-prometheus/prometheus/prometheus.libsonnet
index 026acad0..c993d7af 100644
--- a/jsonnet/kube-prometheus/prometheus/prometheus.libsonnet
+++ b/jsonnet/kube-prometheus/prometheus/prometheus.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.withName('prometheus-' + $._config.prometheus.name) +
         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;
       roleBindigList.new([newSpecificRoleBinding(x) for x in $._config.prometheus.namespaces]),
-- 
GitLab