Skip to content

Commit

Permalink
bugfix(s3-storage-argocd): Fix s3 with existing secret for argocd (#256)
Browse files Browse the repository at this point in the history
  • Loading branch information
stijnbrouwers committed Mar 1, 2024
1 parent 388d844 commit 107a052
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
2 changes: 1 addition & 1 deletion zammad/Chart.yaml
Original file line number Diff line number Diff line change
@@ -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
Expand Down
17 changes: 11 additions & 6 deletions zammad/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 107a052

Please sign in to comment.