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
839efa44
Unverified
Commit
839efa44
authored
Apr 08, 2024
by
Timothy Jaeryang Baek
Committed by
GitHub
Apr 08, 2024
Browse files
Merge pull request #1464 from jmferrer/allow-using-external-ollama
Allow using external ollama service.
parents
0a488c78
2da7dd67
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
0 deletions
+9
-0
kubernetes/helm/templates/_helpers.tpl
kubernetes/helm/templates/_helpers.tpl
+4
-0
kubernetes/helm/templates/ollama-service.yaml
kubernetes/helm/templates/ollama-service.yaml
+2
-0
kubernetes/helm/templates/ollama-statefulset.yaml
kubernetes/helm/templates/ollama-statefulset.yaml
+2
-0
kubernetes/helm/values.yaml
kubernetes/helm/values.yaml
+1
-0
No files found.
kubernetes/helm/templates/_helpers.tpl
View file @
839efa44
...
@@ -7,8 +7,12 @@ ollama
...
@@ -7,8 +7,12 @@ ollama
{{- end -}}
{{- end -}}
{{- define "ollama.url" -}}
{{- define "ollama.url" -}}
{{- if .Values.ollama.externalHost }}
{{- printf .Values.ollama.externalHost }}
{{- else }}
{{- printf "http://%s.%s.svc.cluster.local:%d/" (include "ollama.name" .) (.Release.Namespace) (.Values.ollama.service.port | int) }}
{{- printf "http://%s.%s.svc.cluster.local:%d/" (include "ollama.name" .) (.Release.Namespace) (.Values.ollama.service.port | int) }}
{{- end }}
{{- end }}
{{- end }}
{{- define "chart.name" -}}
{{- define "chart.name" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
...
...
kubernetes/helm/templates/ollama-service.yaml
View file @
839efa44
{{
- if not .Values.ollama.externalHost
}}
apiVersion
:
v1
apiVersion
:
v1
kind
:
Service
kind
:
Service
metadata
:
metadata
:
...
@@ -19,3 +20,4 @@ spec:
...
@@ -19,3 +20,4 @@ spec:
port
:
{{
.port
}}
port
:
{{
.port
}}
targetPort
:
http
targetPort
:
http
{{
- end
}}
{{
- end
}}
{{
- end
}}
kubernetes/helm/templates/ollama-statefulset.yaml
View file @
839efa44
{{
- if not .Values.ollama.externalHost
}}
apiVersion
:
apps/v1
apiVersion
:
apps/v1
kind
:
StatefulSet
kind
:
StatefulSet
metadata
:
metadata
:
...
@@ -94,3 +95,4 @@ spec:
...
@@ -94,3 +95,4 @@ spec:
{{
- toYaml . | nindent 8
}}
{{
- toYaml . | nindent 8
}}
{{
- end
}}
{{
- end
}}
{{
- end
}}
{{
- end
}}
{{
- end
}}
kubernetes/helm/values.yaml
View file @
839efa44
nameOverride
:
"
"
nameOverride
:
"
"
ollama
:
ollama
:
externalHost
:
"
"
annotations
:
{}
annotations
:
{}
podAnnotations
:
{}
podAnnotations
:
{}
replicaCount
:
1
replicaCount
:
1
...
...
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