From 1ae7421fd91a9e3b30f4f3fa27f60e2481dbbd63 Mon Sep 17 00:00:00 2001 From: kahirokunn Date: Wed, 1 May 2024 19:51:15 +0900 Subject: [PATCH] chore: Prevent displaying constant diffs for nextcloud-token in ArgoCD (#554) * chore: Prevent displaying constant diffs for nextcloud-token in ArgoCD When metrics are not enabled, the use of randAlphaNum was causing constant diffs for nextcloud-token in ArgoCD. To mitigate this issue, now nextcloud-token won't be configured when metrics are not enabled. Signed-off-by: kahirokunn * Update charts/nextcloud/templates/secrets.yaml Co-authored-by: JesseBot Signed-off-by: kahirokunn * Update charts/nextcloud/Chart.yaml Co-authored-by: JesseBot Signed-off-by: kahirokunn --------- Signed-off-by: kahirokunn Signed-off-by: JesseBot Co-authored-by: JesseBot --- charts/nextcloud/Chart.yaml | 2 +- charts/nextcloud/templates/secrets.yaml | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/charts/nextcloud/Chart.yaml b/charts/nextcloud/Chart.yaml index e9048363..243346f3 100644 --- a/charts/nextcloud/Chart.yaml +++ b/charts/nextcloud/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v2 name: nextcloud -version: 4.6.7 +version: 4.6.8 appVersion: 29.0.0 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/secrets.yaml b/charts/nextcloud/templates/secrets.yaml index 9b3ed4f9..0858255e 100644 --- a/charts/nextcloud/templates/secrets.yaml +++ b/charts/nextcloud/templates/secrets.yaml @@ -17,9 +17,9 @@ data: {{- else }} nextcloud-password: {{ randAlphaNum 10 | b64enc | quote }} {{- end }} - {{- with .Values.metrics.token }} - nextcloud-token: {{ . | b64enc | quote }} - {{- else }} + {{- if and .Values.metrics.enabled .Values.metrics.token }} + nextcloud-token: {{ .Values.metrics.token | b64enc | quote }} + {{- else if and .Values.metrics.enabled (not .Values.metrics.token) }} nextcloud-token: {{ randAlphaNum 10 | b64enc | quote }} {{- end }} {{- if .Values.nextcloud.mail.enabled }}