From e01c6bab8c6557defd79d9242e400f5dca436605 Mon Sep 17 00:00:00 2001 From: Dileep Ranganathan Date: Mon, 18 Mar 2019 16:06:05 -0700 Subject: Fix Kafka Operator to watch all namespaces. Temp. fix to make Strimzi kafka operator cluster-wide. Issue-ID: ONAPARC-392 Change-Id: Icfda09ed2fdd42efe1a9728509c5c3cbbb9f88c0 Signed-off-by: Dileep Ranganathan --- .../templates/020-RoleBinding-strimzi-cluster-operator.yaml | 2 ++ ...leBinding-strimzi-cluster-operator-entity-operator-delegation.yaml | 2 ++ ...oleBinding-strimzi-cluster-operator-topic-operator-delegation.yaml | 2 ++ .../templates/050-Deployment-strimzi-cluster-operator.yaml | 4 ++++ vnfs/DAaaS/messaging/charts/strimzi-kafka-operator/values.yaml | 3 ++- 5 files changed, 12 insertions(+), 1 deletion(-) (limited to 'vnfs/DAaaS') diff --git a/vnfs/DAaaS/messaging/charts/strimzi-kafka-operator/templates/020-RoleBinding-strimzi-cluster-operator.yaml b/vnfs/DAaaS/messaging/charts/strimzi-kafka-operator/templates/020-RoleBinding-strimzi-cluster-operator.yaml index 5f013145..647774b5 100644 --- a/vnfs/DAaaS/messaging/charts/strimzi-kafka-operator/templates/020-RoleBinding-strimzi-cluster-operator.yaml +++ b/vnfs/DAaaS/messaging/charts/strimzi-kafka-operator/templates/020-RoleBinding-strimzi-cluster-operator.yaml @@ -1,5 +1,6 @@ {{- $root := . -}} {{- range append .Values.watchNamespaces .Release.Namespace }} +{{- if ne . "*" -}} --- apiVersion: rbac.authorization.k8s.io/v1beta1 kind: RoleBinding @@ -21,3 +22,4 @@ roleRef: name: strimzi-cluster-operator-namespaced apiGroup: rbac.authorization.k8s.io {{- end }} +{{- end }} \ No newline at end of file diff --git a/vnfs/DAaaS/messaging/charts/strimzi-kafka-operator/templates/031-RoleBinding-strimzi-cluster-operator-entity-operator-delegation.yaml b/vnfs/DAaaS/messaging/charts/strimzi-kafka-operator/templates/031-RoleBinding-strimzi-cluster-operator-entity-operator-delegation.yaml index 969fccdc..20b163de 100644 --- a/vnfs/DAaaS/messaging/charts/strimzi-kafka-operator/templates/031-RoleBinding-strimzi-cluster-operator-entity-operator-delegation.yaml +++ b/vnfs/DAaaS/messaging/charts/strimzi-kafka-operator/templates/031-RoleBinding-strimzi-cluster-operator-entity-operator-delegation.yaml @@ -1,5 +1,6 @@ {{- $root := . -}} {{- range append .Values.watchNamespaces .Release.Namespace }} +{{- if ne . "*" -}} --- apiVersion: rbac.authorization.k8s.io/v1beta1 kind: RoleBinding @@ -21,3 +22,4 @@ roleRef: name: strimzi-entity-operator apiGroup: rbac.authorization.k8s.io {{- end }} +{{- end }} diff --git a/vnfs/DAaaS/messaging/charts/strimzi-kafka-operator/templates/032-RoleBinding-strimzi-cluster-operator-topic-operator-delegation.yaml b/vnfs/DAaaS/messaging/charts/strimzi-kafka-operator/templates/032-RoleBinding-strimzi-cluster-operator-topic-operator-delegation.yaml index 30602f6f..29f3d36b 100644 --- a/vnfs/DAaaS/messaging/charts/strimzi-kafka-operator/templates/032-RoleBinding-strimzi-cluster-operator-topic-operator-delegation.yaml +++ b/vnfs/DAaaS/messaging/charts/strimzi-kafka-operator/templates/032-RoleBinding-strimzi-cluster-operator-topic-operator-delegation.yaml @@ -1,5 +1,6 @@ {{- $root := . -}} {{- range append .Values.watchNamespaces .Release.Namespace }} +{{- if ne . "*" -}} --- apiVersion: rbac.authorization.k8s.io/v1beta1 kind: RoleBinding @@ -21,3 +22,4 @@ roleRef: name: strimzi-topic-operator apiGroup: rbac.authorization.k8s.io {{- end }} +{{- end }} diff --git a/vnfs/DAaaS/messaging/charts/strimzi-kafka-operator/templates/050-Deployment-strimzi-cluster-operator.yaml b/vnfs/DAaaS/messaging/charts/strimzi-kafka-operator/templates/050-Deployment-strimzi-cluster-operator.yaml index d1ae281a..2f9b570d 100644 --- a/vnfs/DAaaS/messaging/charts/strimzi-kafka-operator/templates/050-Deployment-strimzi-cluster-operator.yaml +++ b/vnfs/DAaaS/messaging/charts/strimzi-kafka-operator/templates/050-Deployment-strimzi-cluster-operator.yaml @@ -24,8 +24,12 @@ spec: - name: STRIMZI_NAMESPACE {{- if .Values.watchNamespaces -}} {{- $ns := .Values.watchNamespaces -}} + {{- if has "*" $ns }} + value: "*" + {{- else -}} {{- $ns := append $ns .Release.Namespace }} value: "{{ join "," $ns }}" + {{- end }} {{- else }} valueFrom: fieldRef: diff --git a/vnfs/DAaaS/messaging/charts/strimzi-kafka-operator/values.yaml b/vnfs/DAaaS/messaging/charts/strimzi-kafka-operator/values.yaml index b9c5f2ef..74a7c581 100644 --- a/vnfs/DAaaS/messaging/charts/strimzi-kafka-operator/values.yaml +++ b/vnfs/DAaaS/messaging/charts/strimzi-kafka-operator/values.yaml @@ -1,6 +1,7 @@ # Default values for strimzi-kafka-operator. -watchNamespaces: [] +watchNamespaces: + - "*" image: repository: strimzi -- cgit 1.2.3-korg