From 46c7ba62565f66f55ca4c92d971332ef777ef6dc Mon Sep 17 00:00:00 2001 From: robrakaric Date: Wed, 8 May 2024 14:17:34 -0700 Subject: [PATCH] changed externalUrls key to ollamaUrls in values.yaml --- charts/open-webui/README.md | 2 +- charts/open-webui/templates/_helpers.tpl | 16 ++++++++-------- charts/open-webui/values.yaml | 14 +++++++++++++- 3 files changed, 22 insertions(+), 10 deletions(-) diff --git a/charts/open-webui/README.md b/charts/open-webui/README.md index 5ea1619..949194e 100644 --- a/charts/open-webui/README.md +++ b/charts/open-webui/README.md @@ -40,7 +40,6 @@ helm upgrade --install open-webui open-webui/open-webui |-----|------|---------|-------------| | annotations | object | `{}` | | | clusterDomain | string | `"cluster.local"` | Value of cluster domain | -| externalHosts | list | `[]` | A list of Ollama API endpoints. These can be added in lieu of automatically installing the Ollama Helm chart, or in addition to it. | | image.pullPolicy | string | `"Always"` | | | image.repository | string | `"ghcr.io/open-webui/open-webui"` | | | image.tag | string | `""` | | @@ -53,6 +52,7 @@ helm upgrade --install open-webui open-webui/open-webui | nameOverride | string | `""` | | | nodeSelector | object | `{}` | | | ollama.enabled | bool | `true` | Automatically install Ollama Helm chart from https://otwld.github.io/ollama-helm/. Use [Helm Values](https://github.com/otwld/ollama-helm/#helm-values) to configure | +| ollamaUrls | list | `[]` | A list of Ollama API endpoints. These can be added in lieu of automatically installing the Ollama Helm chart, or in addition to it. | | persistence.accessModes | list | `["ReadWriteOnce"]` | If using multiple replicas, you must update accessModes to ReadWriteMany | | persistence.annotations | object | `{}` | | | persistence.enabled | bool | `true` | | diff --git a/charts/open-webui/templates/_helpers.tpl b/charts/open-webui/templates/_helpers.tpl index 212d00a..2a923e6 100644 --- a/charts/open-webui/templates/_helpers.tpl +++ b/charts/open-webui/templates/_helpers.tpl @@ -5,9 +5,9 @@ ollama {{- end -}} -{{- define "externalHostUrls" -}} -{{- if .Values.externalHosts }} -{{- join ";" .Values.externalHosts | trimSuffix "/" }} +{{- define "ollamaUrls" -}} +{{- if .Values.ollamaUrls }} +{{- join ";" .Values.ollamaUrls | trimSuffix "/" }} {{- end }} {{- end }} @@ -21,13 +21,13 @@ ollama {{- define "ollamaBaseUrls" -}} {{- $ollamaLocalUrl := include "ollamaLocalUrl" . }} -{{- $externalHostUrls := include "externalHostUrls" . }} -{{- if and .Values.ollama.enabled .Values.externalHosts }} -{{- printf "%s;%s" $externalHostUrls $ollamaLocalUrl }} +{{- $ollamaUrls := include "ollamaUrls" . }} +{{- if and .Values.ollama.enabled .Values.ollamaUrls }} +{{- printf "%s;%s" $ollamaUrls $ollamaLocalUrl }} {{- else if .Values.ollama.enabled }} {{- printf "%s" $ollamaLocalUrl }} -{{- else if .Values.externalHosts }} -{{- printf "%s" $externalHostUrls }} +{{- else if .Values.ollamaUrls }} +{{- printf "%s" $ollamaUrls }} {{- end }} {{- end }} diff --git a/charts/open-webui/values.yaml b/charts/open-webui/values.yaml index 721e701..4c686a2 100644 --- a/charts/open-webui/values.yaml +++ b/charts/open-webui/values.yaml @@ -3,9 +3,21 @@ nameOverride: "" ollama: # -- Automatically install Ollama Helm chart from https://otwld.github.io/ollama-helm/. Use [Helm Values](https://github.com/otwld/ollama-helm/#helm-values) to configure enabled: true + # Example Ollama configuration with nvidia GPU enabled, automatically downloading a model, and deploying a PVC for model persistence + # ollama: + # gpu: + # enabled: true + # type: 'nvidia' + # number: 1 + # models: + # - llama3 + # runtimeClassName: nvidia + # persistentVolume: + # enabled: true + # -- A list of Ollama API endpoints. These can be added in lieu of automatically installing the Ollama Helm chart, or in addition to it. -externalHosts: [] +ollamaUrls: [] # -- Value of cluster domain clusterDomain: cluster.local