mirror of
https://github.com/open-webui/helm-charts
synced 2025-06-26 18:16:14 +00:00
Merge pull request #247 from ffais/webui-url-ingress
fix(open-webui): add WEBUI_URL env var when ingress is enabled
This commit is contained in:
commit
85a85c5d8d
@ -233,3 +233,15 @@ Render a logging env var for a component, validating value
|
|||||||
- name: {{ printf "%s_LOG_LEVEL" (upper $name) | quote }}
|
- name: {{ printf "%s_LOG_LEVEL" (upper $name) | quote }}
|
||||||
value: {{ $level | quote | trim }}
|
value: {{ $level | quote | trim }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
|
{{- /*
|
||||||
|
Constructs a string containing the URLs of the Open WebUI based on the ingress configuration
|
||||||
|
used to populate the variable WEBUI_URL
|
||||||
|
*/ -}}
|
||||||
|
{{- define "openweb-ui.url" -}}
|
||||||
|
{{- $proto := "http" -}}
|
||||||
|
{{- if .Values.ingress.tls -}}
|
||||||
|
{{- $proto = "https" -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- printf "%s://%s" $proto $.Values.ingress.host }}
|
||||||
|
{{- end }}
|
||||||
|
@ -119,6 +119,10 @@ spec:
|
|||||||
{{- toYaml . | nindent 8 }}
|
{{- toYaml . | nindent 8 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
env:
|
env:
|
||||||
|
{{- if .Values.ingress.enabled }}
|
||||||
|
- name: WEBUI_URL
|
||||||
|
value: {{ include "openweb-ui.url" . }}
|
||||||
|
{{- end }}
|
||||||
{{- if .Values.ollamaUrlsFromExtraEnv}}
|
{{- if .Values.ollamaUrlsFromExtraEnv}}
|
||||||
{{- else if or .Values.ollamaUrls .Values.ollama.enabled }}
|
{{- else if or .Values.ollamaUrls .Values.ollama.enabled }}
|
||||||
- name: "OLLAMA_BASE_URLS"
|
- name: "OLLAMA_BASE_URLS"
|
||||||
|
Loading…
Reference in New Issue
Block a user