From 2148dbb5ed4998e924f182dfa964f0b86a53102c Mon Sep 17 00:00:00 2001 From: Pete Brown Date: Thu, 31 Jan 2019 10:42:36 -0500 Subject: [PATCH] Use specified namespace in RBAC The current code doesn't use the specified namespace in the RBAC resources. So everything is deployed into kube-system. This allows us to deploy the workload and RBAC into a different namespace. --- src/incubator/f5-bigip-ctlr/Chart.yaml | 2 +- .../templates/f5-bigip-ctlr-clusterrolebinding.yaml | 3 +-- .../f5-bigip-ctlr/templates/f5-bigip-ctlr-serviceaccount.yaml | 4 ++-- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/incubator/f5-bigip-ctlr/Chart.yaml b/src/incubator/f5-bigip-ctlr/Chart.yaml index 7d76edc89..76928ab96 100644 --- a/src/incubator/f5-bigip-ctlr/Chart.yaml +++ b/src/incubator/f5-bigip-ctlr/Chart.yaml @@ -1,4 +1,4 @@ apiVersion: v1 description: Deploy the F5 Networks BIG-IP Controller for Kubernetes and OpenShift (k8s-bigip-ctlr). name: f5-bigip-ctlr -version: 0.0.4 +version: 0.0.5 diff --git a/src/incubator/f5-bigip-ctlr/templates/f5-bigip-ctlr-clusterrolebinding.yaml b/src/incubator/f5-bigip-ctlr/templates/f5-bigip-ctlr-clusterrolebinding.yaml index 898aa1014..ea60f1515 100644 --- a/src/incubator/f5-bigip-ctlr/templates/f5-bigip-ctlr-clusterrolebinding.yaml +++ b/src/incubator/f5-bigip-ctlr/templates/f5-bigip-ctlr-clusterrolebinding.yaml @@ -2,7 +2,6 @@ kind: ClusterRoleBinding apiVersion: rbac.authorization.k8s.io/v1beta1 metadata: name: f5-bigip-ctlr-clusterrolebinding - namespace: kube-system labels: app: {{ template "f5-bigip-ctlr.name" . }} chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} @@ -15,4 +14,4 @@ roleRef: subjects: - kind: ServiceAccount name: f5-bigip-ctlr-serviceaccount - namespace: kube-system + namespace: {{ .Values.namespace }} diff --git a/src/incubator/f5-bigip-ctlr/templates/f5-bigip-ctlr-serviceaccount.yaml b/src/incubator/f5-bigip-ctlr/templates/f5-bigip-ctlr-serviceaccount.yaml index 5c9e869e7..d42a3b654 100644 --- a/src/incubator/f5-bigip-ctlr/templates/f5-bigip-ctlr-serviceaccount.yaml +++ b/src/incubator/f5-bigip-ctlr/templates/f5-bigip-ctlr-serviceaccount.yaml @@ -2,9 +2,9 @@ apiVersion: v1 kind: ServiceAccount metadata: name: f5-bigip-ctlr-serviceaccount - namespace: kube-system + namespace: {{ .Values.namespace }} labels: app: {{ template "f5-bigip-ctlr.name" . }} chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} release: {{ .Release.Name }} - heritage: {{ .Release.Service }} + heritage: {{ .Release.Service }}