From 786d208f26a3b77d4cecaa335709a42ccb05aed4 Mon Sep 17 00:00:00 2001 From: Sunny Date: Fri, 24 Nov 2023 22:32:51 +0000 Subject: [PATCH 1/2] Include service in trusted domains for metrics When nextcloud-exporter is used by enabling metrics, it fails to fetch the serverinfo with 400 response code. This is related to the switch from ingress to local service endpoint for nextcloud-exporter. To fix this, in addition to .Values.nextcloud.host, the nextcloud service also need to be included in the trusted domains. Signed-off-by: Sunny --- charts/nextcloud/Chart.yaml | 2 +- charts/nextcloud/templates/_helpers.tpl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/charts/nextcloud/Chart.yaml b/charts/nextcloud/Chart.yaml index 26b03113..18a63900 100644 --- a/charts/nextcloud/Chart.yaml +++ b/charts/nextcloud/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v2 name: nextcloud -version: 4.5.2 +version: 4.5.3 appVersion: 27.1.3 description: A file sharing server that puts the control and security of your own data back into your hands. keywords: diff --git a/charts/nextcloud/templates/_helpers.tpl b/charts/nextcloud/templates/_helpers.tpl index d250589c..6816ae90 100644 --- a/charts/nextcloud/templates/_helpers.tpl +++ b/charts/nextcloud/templates/_helpers.tpl @@ -178,7 +178,7 @@ 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 - value: {{ .Values.nextcloud.host }} + value: {{ .Values.nextcloud.host }} {{ if .Values.metrics.enabled }}{{ template "nextcloud.fullname" . }}{{ end }} {{- if ne (int .Values.nextcloud.update) 0 }} - name: NEXTCLOUD_UPDATE value: {{ .Values.nextcloud.update | quote }} From 42fa54e812eb4f8be4ddb86b5e708b765c0c22be Mon Sep 17 00:00:00 2001 From: JesseBot Date: Sun, 9 Jun 2024 09:06:13 +0200 Subject: [PATCH 2/2] Update charts/nextcloud/templates/_helpers.tpl - use full service name and fix spacing for trusted domains Co-authored-by: WrenIX <133280015+wrenix@users.noreply.github.com> Signed-off-by: JesseBot --- charts/nextcloud/templates/_helpers.tpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/nextcloud/templates/_helpers.tpl b/charts/nextcloud/templates/_helpers.tpl index 6816ae90..b58dd946 100644 --- a/charts/nextcloud/templates/_helpers.tpl +++ b/charts/nextcloud/templates/_helpers.tpl @@ -178,7 +178,7 @@ 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 - value: {{ .Values.nextcloud.host }} {{ if .Values.metrics.enabled }}{{ template "nextcloud.fullname" . }}{{ end }} + value: {{ .Values.nextcloud.host }}{{ if .Values.metrics.enabled }} {{ template "nextcloud.fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local{{ end }} {{- if ne (int .Values.nextcloud.update) 0 }} - name: NEXTCLOUD_UPDATE value: {{ .Values.nextcloud.update | quote }}