From df2c3f571e96b396806f0083cb87b35f1ae3061e 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/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 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 }}