From f7339c8954abcd24549fc1566a7cab240ec8b573 Mon Sep 17 00:00:00 2001 From: rjshrjndrn Date: Tue, 11 Feb 2025 16:11:07 +0100 Subject: [PATCH] fix(helm): handle empty s3 endpoint url Signed-off-by: rjshrjndrn --- scripts/helmcharts/openreplay/templates/_helpers.tpl | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/scripts/helmcharts/openreplay/templates/_helpers.tpl b/scripts/helmcharts/openreplay/templates/_helpers.tpl index 554dd402a..805ab62f5 100644 --- a/scripts/helmcharts/openreplay/templates/_helpers.tpl +++ b/scripts/helmcharts/openreplay/templates/_helpers.tpl @@ -29,10 +29,14 @@ ingress-nginx: &ingress-nginx {{/* Get the S3 endpoint value */}} {{- define "openreplay.s3Endpoint" -}} -{{- if contains "minio" .Values.global.s3.endpoint -}} -{{- include "openreplay.domainURL" . -}} +{{- if .Values.global.s3.endpoint -}} + {{- if contains "minio" .Values.global.s3.endpoint -}} + {{- include "openreplay.domainURL" . -}} + {{- else -}} + {{- .Values.global.s3.endpoint -}} + {{- end -}} {{- else -}} -{{- .Values.global.s3.endpoint -}} + {{- printf "https://s3.%s.amazonaws.com" .Values.global.s3.region -}} {{- end -}} {{- end -}}