From 82328d53baea9463c7447db7e43473cf7101695e Mon Sep 17 00:00:00 2001
From: Thomas Kaltenbrunner <thomas.kaltenbrunner.extern@univention.de>
Date: Fri, 20 Oct 2023 20:40:41 +0200
Subject: [PATCH] fix(sovereign-workplace-jitsi): Use "| quote" wherever
 possible

---
 .../templates/deployment.yaml                 | 26 +++++++++----------
 .../templates/job.yaml                        |  8 +++---
 .../templates/service.yaml                    |  6 ++---
 .../templates/serviceaccount.yaml             |  2 +-
 4 files changed, 21 insertions(+), 21 deletions(-)

diff --git a/charts/sovereign-workplace-jitsi/templates/deployment.yaml b/charts/sovereign-workplace-jitsi/templates/deployment.yaml
index d41f3cf..16b845b 100644
--- a/charts/sovereign-workplace-jitsi/templates/deployment.yaml
+++ b/charts/sovereign-workplace-jitsi/templates/deployment.yaml
@@ -3,10 +3,10 @@ SPDX-FileCopyrightText: 2023 Bundesministerium des Innern und für Heimat, PG Ze
 SPDX-License-Identifier: Apache-2.0
 */}}
 ---
-apiVersion: {{ include "common.capabilities.deployment.apiVersion" . }}
+apiVersion: {{ include "common.capabilities.deployment.apiVersion" . | quote }}
 kind: "Deployment"
 metadata:
-  name: {{ include "sovereign-workplace-jitsi.keycloakAdapter.fullname" . }}
+  name: {{ include "sovereign-workplace-jitsi.keycloakAdapter.fullname" . | quote }}
   namespace: {{ include "common.names.namespace" . | quote }}
   labels: {{- include "common.labels.standard" . | nindent 4 }}
 spec:
@@ -27,10 +27,10 @@ spec:
       {{- if or .Values.imagePullSecrets .Values.global.imagePullSecrets }}
       imagePullSecrets:
         {{- range .Values.global.imagePullSecrets }}
-        - name: "{{ . }}"
+        - name: {{ . | quote }}
         {{- end }}
         {{- range .Values.imagePullSecrets }}
-        - name: "{{ . }}"
+        - name: {{ . | quote }}
         {{- end }}
       {{- end }}
       {{- if .Values.affinity }}
@@ -65,23 +65,23 @@ spec:
             - name: KEYCLOAK_ORIGIN
               value: "https://{{- .Values.global.hosts.keycloak}}.{{ .Values.global.domain }}"
             - name: KEYCLOAK_REALM
-              value: "{{- .Values.settings.keycloakRealm -}}"
+              value: {{ .Values.settings.keycloakRealm | quote }}
             - name: KEYCLOAK_CLIENT_ID
-              value: "{{- .Values.settings.keycloakClientId -}}"
+              value: {{ .Values.settings.keycloakClientId | quote }}
             - name: JWT_APP_ID
-              value: "{{- .Values.settings.jwtAppId -}}"
+              value: {{ .Values.settings.jwtAppId | quote }}
             - name: JWT_APP_SECRET
-              value: "{{- .Values.settings.jwtAppSecret -}}"
+              value: {{ .Values.settings.jwtAppSecret | quote }}
             - name: JWT_ALG
-              value: "{{- .Values.settings.jwtAlg -}}"
+              value: {{ .Values.settings.jwtAlg | quote }}
             - name: JWT_HASH
-              value: "{{- .Values.settings.jwtHash -}}"
+              value: {{ .Values.settings.jwtHash | quote }}
             - name: JWT_EXP_SECOND
-              value: "{{- .Values.settings.jwtExpSecond -}}"
+              value: {{ .Values.settings.jwtExpSecond | quote }}
             - name: HOSTNAME
-              value: "{{- .Values.settings.internalHostname -}}"
+              value: {{ .Values.settings.internalHostname | quote }}
             - name: ALLOW_UNSECURE_CERT
-              value: "{{- .Values.settings.allowUnsecureCert -}}"
+              value: {{ .Values.settings.allowUnsecureCert | quote }}
           {{- with .Values.extraEnvVars }}
             {{- . | toYaml | nindent 12 }}
           {{- end }}
diff --git a/charts/sovereign-workplace-jitsi/templates/job.yaml b/charts/sovereign-workplace-jitsi/templates/job.yaml
index 88e0429..d770e28 100644
--- a/charts/sovereign-workplace-jitsi/templates/job.yaml
+++ b/charts/sovereign-workplace-jitsi/templates/job.yaml
@@ -21,17 +21,17 @@ spec:
       {{- if or .Values.patchJVB.imagePullSecrets .Values.global.imagePullSecrets }}
       imagePullSecrets:
         {{- range .Values.global.imagePullSecrets }}
-        - name: "{{ . }}"
+        - name: {{ . | quote }}
         {{- end }}
         {{- range .Values.patchJVB.imagePullSecrets }}
-        - name: "{{ . }}"
+        - name: {{ . | quote }}
         {{- end }}
       {{- end }}
       {{- if .Values.patchJVB.podSecurityContext.enabled }}
       securityContext: {{- omit .Values.patchJVB.podSecurityContext "enabled" | toYaml | nindent 8 }}
       {{- end }}
       {{- if .Values.serviceAccount.create }}
-      serviceAccountName: {{ include "common.names.fullname" . }}
+      serviceAccountName: {{ include "common.names.fullname" . | quote }}
       {{- end }}
       containers:
         - name: "advertise-ip"
@@ -52,5 +52,5 @@ spec:
       volumes:
         - name: "init"
           configMap:
-            name: {{ include "common.names.fullname" . }}
+            name: {{ include "common.names.fullname" . | quote }}
 ...
diff --git a/charts/sovereign-workplace-jitsi/templates/service.yaml b/charts/sovereign-workplace-jitsi/templates/service.yaml
index 7791a46..3262949 100644
--- a/charts/sovereign-workplace-jitsi/templates/service.yaml
+++ b/charts/sovereign-workplace-jitsi/templates/service.yaml
@@ -17,13 +17,13 @@ metadata:
     {{- end }}
   {{- end }}
 spec:
-  type: "{{ .Values.service.type }}"
+  type: {{ .Values.service.type | quote }}
   ports:
     {{- range $key, $value := .Values.service.ports }}
-    - name: "{{ $key }}"
+    - name: {{ $key | quote }}
       port: {{ $value.port }}
       targetPort: {{ $value.port }}
-      protocol: "{{ $value.protocol | default "TCP" }}"
+      protocol: {{ $value.protocol | default "TCP" | quote }}
       {{- if and $value.nodePort (not (eq $.Values.service.type "ClusterIP")) }}
       nodePort: {{ $value.nodePort }}
       {{- end }}
diff --git a/charts/sovereign-workplace-jitsi/templates/serviceaccount.yaml b/charts/sovereign-workplace-jitsi/templates/serviceaccount.yaml
index a1994a6..26ecb0d 100644
--- a/charts/sovereign-workplace-jitsi/templates/serviceaccount.yaml
+++ b/charts/sovereign-workplace-jitsi/templates/serviceaccount.yaml
@@ -7,7 +7,7 @@ SPDX-License-Identifier: Apache-2.0
 apiVersion: "v1"
 kind: "ServiceAccount"
 metadata:
-  name: "{{ include "common.names.fullname" . }}"
+  name: {{ include "common.names.fullname" . | quote }}
   namespace: {{ include "common.names.namespace" . | quote }}
   labels: {{- include "common.labels.standard" . | nindent 4 }}
     {{- if .Values.serviceAccount.labels }}
-- 
GitLab