Skip to content

Commit

Permalink
bugfix(minio): Fix authentication bug when using existing secret (#253)
Browse files Browse the repository at this point in the history
  • Loading branch information
stijnbrouwers authored Feb 26, 2024
1 parent 61e5ca9 commit be16de0
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 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.0
version: 10.3.1
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
12 changes: 11 additions & 1 deletion zammad/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,18 @@ S3 access URL
value: {{ . | quote }}
{{- else -}}
{{- if .Values.zammadConfig.minio.enabled -}}
{{- if .Values.minio.auth.existingSecret -}}
{{ $existingSecret := (lookup "v1" "Secret" .Release.Namespace .Values.minio.auth.existingSecret) }}
{{- if $existingSecret }}
- name: S3_URL
value: "http://zammadadmin:zammadadmin@{{ template "zammad.fullname" . }}-minio:9000/zammad?region=zammad&force_path_style=true"
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 -}}
{{- 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"
{{- end -}}
{{- end -}}
{{- end -}}
{{- end -}}

0 comments on commit be16de0

Please sign in to comment.