From 7d30242557401bfdb0be5f75bd29ce05708d250f Mon Sep 17 00:00:00 2001
From: Thiago Brito <thiago.brito@windriver.com>
Date: Tue, 1 Jun 2021 10:47:33 -0300
Subject: [PATCH] Fix chart syntax to comply with Go 1.14

When testing patch [1] it was found that the usage of parenthesis on
this chart doesn't comply with the Tiller implementation on Go 1.14.
This fix will allow the upversion of Tiller to > 2.16.8 which is
required for the Armada upversioning.

[1] https://review.opendev.org/c/starlingx/ansible-playbooks/+/792297

Partial-Bug: #1928994
Signed-off-by: Thiago Brito <thiago.brito@windriver.com>
Change-Id: I8532036cd70b3e20a143dceba19119779413eb39
---
 .../helm-charts/rbd-provisioner/templates/daemonset.yaml  | 8 ++++----
 .../helm-charts/rbd-provisioner/templates/deployment.yaml | 2 +-
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/stx-platform-helm/stx-platform-helm/helm-charts/rbd-provisioner/templates/daemonset.yaml b/stx-platform-helm/stx-platform-helm/helm-charts/rbd-provisioner/templates/daemonset.yaml
index 0c04641..40d01ac 100644
--- a/stx-platform-helm/stx-platform-helm/helm-charts/rbd-provisioner/templates/daemonset.yaml
+++ b/stx-platform-helm/stx-platform-helm/helm-charts/rbd-provisioner/templates/daemonset.yaml
@@ -23,9 +23,9 @@ spec:
       labels:
         app: {{ .Values.global.name }}
     spec:
-{{- if (.Values.global.rbac) or (.Values.global.reuseRbac)}}
-      serviceAccountName: {{.Values.rbac.serviceAccount}}
-{{- end}}
+{{- if or .Values.global.rbac .Values.global.reuseRbac }}
+      serviceAccountName: {{ .Values.rbac.serviceAccount }}
+{{- end }}
 {{- if .Values.global.tolerations }}
       tolerations:
 {{ .Values.global.tolerations | toYaml | trim | indent 8 }}
@@ -44,4 +44,4 @@ spec:
           env:
           - name: PROVISIONER_NAME
             value: {{ .Values.global.provisioner_name }}
-{{- end}}
+{{- end }}
diff --git a/stx-platform-helm/stx-platform-helm/helm-charts/rbd-provisioner/templates/deployment.yaml b/stx-platform-helm/stx-platform-helm/helm-charts/rbd-provisioner/templates/deployment.yaml
index 072f553..5bda622 100644
--- a/stx-platform-helm/stx-platform-helm/helm-charts/rbd-provisioner/templates/deployment.yaml
+++ b/stx-platform-helm/stx-platform-helm/helm-charts/rbd-provisioner/templates/deployment.yaml
@@ -24,7 +24,7 @@ spec:
       labels:
         app: {{ .Values.global.name }}
     spec:
-    {{- if (.Values.global.rbac) or (.Values.global.reuseRbac)}}
+    {{- if or .Values.global.rbac .Values.global.reuseRbac }}
       serviceAccount: {{ .Values.rbac.serviceAccount }}
     {{- end }}
       affinity: