diff --git a/charts/stable/nextcloud/Chart.yaml b/charts/stable/nextcloud/Chart.yaml index 990f50f2d19..a8f3dddf908 100644 --- a/charts/stable/nextcloud/Chart.yaml +++ b/charts/stable/nextcloud/Chart.yaml @@ -33,4 +33,4 @@ sources: - https://github.com/nextcloud/docker - https://github.com/nextcloud/helm type: application -version: 3.7.14 +version: 3.7.15 diff --git a/charts/stable/nextcloud/templates/_configmap.tpl b/charts/stable/nextcloud/templates/_configmap.tpl index aa6473aaf29..3bb5a51325b 100644 --- a/charts/stable/nextcloud/templates/_configmap.tpl +++ b/charts/stable/nextcloud/templates/_configmap.tpl @@ -3,13 +3,15 @@ {{- $hosts := "" }} {{- if .Values.ingress.main.enabled }} -{{ range $index, $host := .Values.ingress.main.hosts }} +{{- range .Values.ingress }} +{{- range $index, $host := .hosts }} {{- if $index }} {{ $hosts = ( printf "%v %v" $hosts $host.host ) }} {{- else }} {{ $hosts = ( printf "%s" $host.host ) }} {{- end }} -{{ end }} +{{- end }} +{{- end }} {{- end }} --- apiVersion: v1 diff --git a/charts/stable/nextcloud/values.yaml b/charts/stable/nextcloud/values.yaml index f2e80b820aa..5fc6cd6e647 100644 --- a/charts/stable/nextcloud/values.yaml +++ b/charts/stable/nextcloud/values.yaml @@ -81,6 +81,33 @@ initContainers: secretKeyRef: name: dbcreds key: plainhost + - name: injectconfig + image: nextcloud:22.1.1 + envFrom: + - configMapRef: + name: nextcloudconfig + command: + - "su" + - "-p" + - "www-data" + - "-s" + - "/bin/sh" + - "-c" + args: + - if [ -f /var/www/html/occ ]; then + if [ -n "${NEXTCLOUD_TRUSTED_DOMAINS+x}" ]; then + echo "setting trusted domains…"; + NC_TRUSTED_DOMAIN_IDX=1; + for DOMAIN in $NEXTCLOUD_TRUSTED_DOMAINS ; do + DOMAIN=$(echo "$DOMAIN" | sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//'); + php /var/www/html/occ config:system:set trusted_domains $NC_TRUSTED_DOMAIN_IDX --value=$DOMAIN; + NC_TRUSTED_DOMAIN_IDX=$(($NC_TRUSTED_DOMAIN_IDX+1)); + done; + fi; + fi; + volumeMounts: + - mountPath: /var/www/html + name: data podSecurityContext: