Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
open-webui
Commits
4f78acaa
Unverified
Commit
4f78acaa
authored
Mar 25, 2024
by
Timothy Jaeryang Baek
Committed by
GitHub
Mar 25, 2024
Browse files
Merge pull request #1299 from jannikstdl/k8s-pvc-naming-fix
K8s fixes
parents
5d6cee0c
7f405c74
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
5 deletions
+7
-5
backend/config.py
backend/config.py
+4
-2
kubernetes/manifest/base/webui-deployment.yaml
kubernetes/manifest/base/webui-deployment.yaml
+1
-1
kubernetes/manifest/base/webui-pvc.yaml
kubernetes/manifest/base/webui-pvc.yaml
+2
-2
No files found.
backend/config.py
View file @
4f78acaa
...
...
@@ -238,7 +238,7 @@ OLLAMA_API_BASE_URL = os.environ.get(
)
OLLAMA_BASE_URL
=
os
.
environ
.
get
(
"OLLAMA_BASE_URL"
,
""
)
KUBERNETES_SERVICE_HOST
=
os
.
environ
.
get
(
"KUBERNETES_SERVICE_HOST"
,
""
)
if
OLLAMA_BASE_URL
==
""
and
OLLAMA_API_BASE_URL
!=
""
:
OLLAMA_BASE_URL
=
(
...
...
@@ -248,8 +248,10 @@ if OLLAMA_BASE_URL == "" and OLLAMA_API_BASE_URL != "":
)
if
ENV
==
"prod"
:
if
OLLAMA_BASE_URL
==
"/ollama"
:
if
OLLAMA_BASE_URL
==
"/ollama"
and
KUBERNETES_SERVICE_HOST
==
""
:
OLLAMA_BASE_URL
=
"http://host.docker.internal:11434"
else
:
OLLAMA_BASE_URL
=
"http://ollama-service.open-webui.svc.cluster.local:11434"
OLLAMA_BASE_URLS
=
os
.
environ
.
get
(
"OLLAMA_BASE_URLS"
,
""
)
...
...
kubernetes/manifest/base/webui-deployment.yaml
View file @
4f78acaa
...
...
@@ -35,4 +35,4 @@ spec:
volumes
:
-
name
:
webui-volume
persistentVolumeClaim
:
claimName
:
ollama-webui-pvc
\ No newline at end of file
claimName
:
open-webui-pvc
\ No newline at end of file
kubernetes/manifest/base/webui-pvc.yaml
View file @
4f78acaa
...
...
@@ -2,8 +2,8 @@ apiVersion: v1
kind
:
PersistentVolumeClaim
metadata
:
labels
:
app
:
o
llama
-webui
name
:
o
llama
-webui-pvc
app
:
o
pen
-webui
name
:
o
pen
-webui-pvc
namespace
:
open-webui
spec
:
accessModes
:
[
"
ReadWriteOnce"
]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment