From d15eedc1175b4bdbf7ea1c54e6b7901cd06a5fef Mon Sep 17 00:00:00 2001 From: Ian Roberts Date: Thu, 2 Mar 2023 15:29:34 +0000 Subject: [PATCH] If a given privacyPolicy.*.* setting is not provided, leave the corresponding env var completely unset rather than explicitly setting it to an empty string value. --- .../templates/deployment-backend.yaml | 29 ++++++++++++++----- 1 file changed, 22 insertions(+), 7 deletions(-) diff --git a/gate-teamware/templates/deployment-backend.yaml b/gate-teamware/templates/deployment-backend.yaml index 32336bc..35ab778 100644 --- a/gate-teamware/templates/deployment-backend.yaml +++ b/gate-teamware/templates/deployment-backend.yaml @@ -132,24 +132,39 @@ spec: key: refresh-token {{- end }}{{/* if backend gmail */}} {{- end }}{{/* with .Values.email */}} + {{- with $.Values.privacyPolicy }} # Privacy Policy Settings + {{- with .host.name }} - name: PP_HOST_NAME - value: {{ .host.name | quote }} + value: {{ . | quote }} + {{- end }} + {{- with .host.address }} - name: PP_HOST_ADDRESS - value: {{ .host.address | quote }} + value: {{ . | quote }} + {{- end }} + {{- with .host.contact }} - name: PP_HOST_CONTACT - value: {{ .host.contact | quote }} + value: {{ . | quote }} + {{- end }} + {{- with .admin.name }} - name: PP_ADMIN_NAME - value: {{ .admin.name | quote }} + value: {{ . | quote }} + {{- end }} + {{- with .admin.address }} - name: PP_ADMIN_ADDRESS - value: {{ .admin.address | quote }} - - name: PP_ADMIN_CONTACT - value: {{ .admin.contact | quote }} + value: {{ . | quote }} {{- end }} + {{- with .admin.contact }} + - name: PP_ADMIN_CONTACT + value: {{ . | quote }} + {{- end }}{{/* with .admin.contact */}} + {{- end }}{{/* with $.Values.privacyPolicy */}} + {{- with .extraEnv }} {{- toYaml . | nindent 10 }} {{- end }} + {{- if and $.Values.email.smtp.security $.Values.email.smtp.clientCertSecret }} volumeMounts: - name: email-client-cert