forked from open-webui/open-webui
Merge pull request #1464 from jmferrer/allow-using-external-ollama
Allow using external ollama service.
This commit is contained in:
commit
839efa4443
4 changed files with 9 additions and 0 deletions
|
@ -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 "-" }}
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
{{- if not .Values.ollama.externalHost }}
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: Service
|
kind: Service
|
||||||
metadata:
|
metadata:
|
||||||
|
@ -19,3 +20,4 @@ spec:
|
||||||
port: {{ .port }}
|
port: {{ .port }}
|
||||||
targetPort: http
|
targetPort: http
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
{{- if not .Values.ollama.externalHost }}
|
||||||
apiVersion: apps/v1
|
apiVersion: apps/v1
|
||||||
kind: StatefulSet
|
kind: StatefulSet
|
||||||
metadata:
|
metadata:
|
||||||
|
@ -94,3 +95,4 @@ spec:
|
||||||
{{- toYaml . | nindent 8 }}
|
{{- toYaml . | nindent 8 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
nameOverride: ""
|
nameOverride: ""
|
||||||
|
|
||||||
ollama:
|
ollama:
|
||||||
|
externalHost: ""
|
||||||
annotations: {}
|
annotations: {}
|
||||||
podAnnotations: {}
|
podAnnotations: {}
|
||||||
replicaCount: 1
|
replicaCount: 1
|
||||||
|
|
Loading…
Reference in a new issue