From 107a052a6cdf575bfcb8d8ab2b306d82557eef24 Mon Sep 17 00:00:00 2001 From: Stijn Brouwers Date: Fri, 1 Mar 2024 07:44:33 +0100 Subject: [PATCH] bugfix(s3-storage-argocd): Fix s3 with existing secret for argocd (#256) --- zammad/Chart.yaml | 2 +- zammad/templates/_helpers.tpl | 17 +++++++++++------ 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/zammad/Chart.yaml b/zammad/Chart.yaml index b2759d5e..9d787fdd 100644 --- a/zammad/Chart.yaml +++ b/zammad/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v2 name: zammad -version: 10.3.2 +version: 10.3.3 appVersion: 6.2.0-1 description: Zammad is a web based open source helpdesk/customer support system with many features to manage customer communication via several channels like telephone, facebook, twitter, chat and e-mails. home: https://zammad.org diff --git a/zammad/templates/_helpers.tpl b/zammad/templates/_helpers.tpl index 9a4a8a61..d41a9eef 100644 --- a/zammad/templates/_helpers.tpl +++ b/zammad/templates/_helpers.tpl @@ -116,13 +116,18 @@ S3 access URL {{- else -}} {{- if .Values.zammadConfig.minio.enabled -}} {{- if .Values.minio.auth.existingSecret -}} -{{ $existingSecret := (lookup "v1" "Secret" .Release.Namespace .Values.minio.auth.existingSecret) }} -{{- if $existingSecret }} +- name: MINIO_ROOT_USER + valueFrom: + secretKeyRef: + key: root-user + name: {{ .Values.minio.auth.existingSecret }} +- name: MINIO_ROOT_PASSWORD + valueFrom: + secretKeyRef: + key: root-password + name: {{ .Values.minio.auth.existingSecret }} - name: S3_URL - value: "http://{{ index $existingSecret "data" "root-user" | b64dec }}:{{ index $existingSecret "data" "root-password" | b64dec }}@{{ template "zammad.fullname" . }}-minio:9000/zammad?region=zammad&force_path_style=true" -{{- else }} -{{- fail "Unable to retrieve the secret used to set the minio authentication values (Values.minio.auth.existingSecret)" }} -{{- end -}} + value: "http://$(MINIO_ROOT_USER):$(MINIO_ROOT_PASSWORD)@{{ template "zammad.fullname" . }}-minio:9000/zammad?region=zammad&force_path_style=true" {{- else -}} - name: S3_URL value: "http://{{ .Values.minio.auth.rootUser }}:{{ .Values.minio.auth.rootPassword }}@{{ template "zammad.fullname" . }}-minio:9000/zammad?region=zammad&force_path_style=true"