mirror of
				https://github.com/open-webui/helm-charts
				synced 2025-06-26 18:16:14 +00:00 
			
		
		
		
	Merge pull request #251 from zadjadr/patch-1
This commit is contained in:
		
						commit
						9ea553bb62
					
				| @ -239,9 +239,18 @@ Constructs a string containing the URLs of the Open WebUI based on the ingress c | |||||||
| used to populate the variable WEBUI_URL   | used to populate the variable WEBUI_URL   | ||||||
| */ -}} | */ -}} | ||||||
| {{- define "openweb-ui.url" -}} | {{- define "openweb-ui.url" -}} | ||||||
|   {{- $proto := "http" -}} |   {{- $url := "" -}} | ||||||
|   {{- if .Values.ingress.tls -}} |   {{- range .Values.extraEnvVars }} | ||||||
|     {{- $proto = "https" -}} |     {{- if and (eq .name "WEBUI_URL") .value }} | ||||||
|   {{- end -}} |       {{- $url = .value }} | ||||||
|   {{- printf "%s://%s" $proto $.Values.ingress.host }} |     {{- end }} | ||||||
|  |   {{- end }} | ||||||
|  |   {{- if not $url }} | ||||||
|  |     {{- $proto := "http" -}} | ||||||
|  |     {{- if .Values.ingress.tls }} | ||||||
|  |       {{- $proto = "https" -}} | ||||||
|  |     {{- end }} | ||||||
|  |     {{- $url = printf "%s://%s" $proto .Values.ingress.host }} | ||||||
|  |   {{- end }} | ||||||
|  |   {{- $url }} | ||||||
| {{- end }} | {{- end }} | ||||||
|  | |||||||
| @ -119,9 +119,15 @@ spec: | |||||||
|         {{- toYaml . | nindent 8 }} |         {{- toYaml . | nindent 8 }} | ||||||
|         {{- end }} |         {{- end }} | ||||||
|         env: |         env: | ||||||
|         {{- if .Values.ingress.enabled }} |         {{- $hasCustomWebUIUrl := false }} | ||||||
|  |         {{- range .Values.extraEnvVars }} | ||||||
|  |           {{- if eq .name "WEBUI_URL" }} | ||||||
|  |             {{- $hasCustomWebUIUrl = true }} | ||||||
|  |           {{- end }} | ||||||
|  |         {{- end }} | ||||||
|  |         {{- if and .Values.ingress.enabled (not $hasCustomWebUIUrl) }} | ||||||
|         - name: WEBUI_URL |         - name: WEBUI_URL | ||||||
|           value: {{ include "openweb-ui.url" . }} |           value: {{ include "openweb-ui.url" . | quote }} | ||||||
|         {{- end }} |         {{- end }} | ||||||
|         {{- if .Values.ollamaUrlsFromExtraEnv}} |         {{- if .Values.ollamaUrlsFromExtraEnv}} | ||||||
|         {{- else if or .Values.ollamaUrls .Values.ollama.enabled }} |         {{- else if or .Values.ollamaUrls .Values.ollama.enabled }} | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user