From 6db0dd567a3924cbf3669c17c0ebcf8b695ac64b Mon Sep 17 00:00:00 2001 From: jessebot Date: Wed, 24 Jul 2024 19:17:07 +0200 Subject: [PATCH] allow setting nextcloud trusted domains only if it's provided in values.yaml Signed-off-by: jessebot --- charts/nextcloud/templates/_helpers.tpl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/charts/nextcloud/templates/_helpers.tpl b/charts/nextcloud/templates/_helpers.tpl index 1e45d63c..65d6837c 100644 --- a/charts/nextcloud/templates/_helpers.tpl +++ b/charts/nextcloud/templates/_helpers.tpl @@ -178,7 +178,11 @@ Create environment variables used to configure the nextcloud container as well a name: {{ .Values.nextcloud.existingSecret.secretName | default (include "nextcloud.fullname" .) }} key: {{ .Values.nextcloud.existingSecret.passwordKey }} - name: NEXTCLOUD_TRUSTED_DOMAINS + {{- if .Values.nextcloud.trustedDomains }} + value: {{ join " " . | quote }} + {{- else }} value: {{ .Values.nextcloud.host }}{{ if .Values.metrics.enabled }} {{ template "nextcloud.fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local{{ end }} + {{- end }} {{- if ne (int .Values.nextcloud.update) 0 }} - name: NEXTCLOUD_UPDATE value: {{ .Values.nextcloud.update | quote }} @@ -323,10 +327,6 @@ Swift as primary object store env vars - name: OBJECTSTORE_SWIFT_CONTAINER_NAME value: {{ .Values.nextcloud.objectStore.swift.container | quote }} {{- end }}{{/* end if nextcloud.objectStore.s3.enabled */}} -{{- with .Values.nextcloud.trustedDomains }} -- name: NEXTCLOUD_TRUSTED_DOMAINS - value: {{ join " " . | quote }} -{{- end }} {{- if .Values.nextcloud.extraEnv }} {{ toYaml .Values.nextcloud.extraEnv }} {{- end }}