From afb59263f515f2bde3828221c44bc9587d504df8 Mon Sep 17 00:00:00 2001 From: Olivier Boudry Date: Wed, 11 Jun 2025 17:05:07 +0200 Subject: [PATCH] Fix issue #253 --- charts/open-webui/templates/_helpers.tpl | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/charts/open-webui/templates/_helpers.tpl b/charts/open-webui/templates/_helpers.tpl index 57fb40f..4a1ab32 100644 --- a/charts/open-webui/templates/_helpers.tpl +++ b/charts/open-webui/templates/_helpers.tpl @@ -239,18 +239,15 @@ Constructs a string containing the URLs of the Open WebUI based on the ingress c used to populate the variable WEBUI_URL */ -}} {{- define "openweb-ui.url" -}} - {{- $url := "" -}} - {{- range .Values.extraEnvVars }} - {{- if and (eq .name "WEBUI_URL") .value }} - {{- $url = .value }} - {{- end }} - {{- end }} - {{- if not $url }} + {{- $webuiEnv := where .Values.extraEnvVars "name" "WEBUI_URL" | first -}} + {{- if and $webuiEnv $webuiEnv.value }} + {{- $webuiEnv.value }} + {{- else }} {{- $proto := "http" -}} {{- if .Values.ingress.tls }} {{- $proto = "https" -}} {{- end }} - {{- $url = printf "%s://%s" $proto .Values.ingress.host }} + {{- printf "%s://%s" $proto .Values.ingress.host }} {{- end }} - {{- $url }} {{- end }} +