From f8cf00730b4fd05a22a290d0773f8fd463f0bbcf Mon Sep 17 00:00:00 2001 From: Sunny Date: Sun, 9 Jun 2024 12:40:28 +0530 Subject: [PATCH] Include nextcloud service in trusted domains for metrics exporter (#483) * 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 * 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 --------- Signed-off-by: Sunny Signed-off-by: JesseBot Co-authored-by: JesseBot Co-authored-by: WrenIX <133280015+wrenix@users.noreply.github.com> --- 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 62fdfdc6..cee10d28 100644 --- a/charts/nextcloud/Chart.yaml +++ b/charts/nextcloud/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v2 name: nextcloud -version: 4.6.10 +version: 4.6.11 appVersion: 29.0.1 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 8214e1ab..d9570f76 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" . }}.{{ .Release.Namespace }}.svc.cluster.local{{ end }} {{- if ne (int .Values.nextcloud.update) 0 }} - name: NEXTCLOUD_UPDATE value: {{ .Values.nextcloud.update | quote }}