"examples/git@developer.sourcefind.cn:OpenDAS/nni.git" did not exist on "f579f176fc3e987615440aa89bc0f250803ad037"
Commit 2da7dd67 authored by jmferrerm's avatar jmferrerm
Browse files

Allow using external ollama service.

parent 331fe04d
...@@ -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 "-" }}
......
{{- 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 }}
{{- 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 }}
nameOverride: "" nameOverride: ""
ollama: ollama:
externalHost: ""
annotations: {} annotations: {}
podAnnotations: {} podAnnotations: {}
replicaCount: 1 replicaCount: 1
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment