From 26a6ed6beb925623c76f4642e6b01f8f8ff7b2fd Mon Sep 17 00:00:00 2001 From: Xstar97TheNoob <9399967+xstar97@users.noreply.github.com> Date: Fri, 15 Mar 2024 18:39:20 -0400 Subject: [PATCH] fix(ollama) fix ollama web sidecar api backend integration (#19177) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit **Description** Fixes the ollama frontend backend connection ⚒️ Fixes #19176 #19178 #19192 **⚙️ Type of change** - [ ] ⚙️ Feature/App addition - [X] 🪛 Bugfix - [ ] ⚠️ Breaking change (fix or feature that would cause existing functionality to not work as expected) - [ ] 🔃 Refactor of current code **🧪 How Has This Been Tested?** **📃 Notes:** **✔️ Checklist:** - [X] ⚖️ My code follows the style guidelines of this project - [X] 👀 I have performed a self-review of my own code - [ ] #️⃣ I have commented my code, particularly in hard-to-understand areas - [ ] 📄 I have made corresponding changes to the documentation - [ ] ⚠️ My changes generate no new warnings - [ ] 🧪 I have added tests to this description that prove my fix is effective or that my feature works - [X] ⬆️ I increased versions for any altered app according to semantic versioning **➕ App addition** If this PR is an app addition please make sure you have done the following. - [ ] 🖼️ I have added an icon in the Chart's root directory called `icon.png` --- _Please don't blindly check all the boxes. Read them and only check those that apply. Those checkboxes are there for the reviewer to see what is this all about and the status of this PR with a quick glance._ --------- Signed-off-by: Xstar97TheNoob <9399967+xstar97@users.noreply.github.com> --- charts/stable/ollama/Chart.yaml | 4 ++-- charts/stable/ollama/values.yaml | 20 +++++++++++--------- 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/charts/stable/ollama/Chart.yaml b/charts/stable/ollama/Chart.yaml index 0c5d8542983..301a6a83580 100644 --- a/charts/stable/ollama/Chart.yaml +++ b/charts/stable/ollama/Chart.yaml @@ -10,7 +10,7 @@ apiVersion: v2 appVersion: 0.1.29 dependencies: - name: common - version: 20.0.9 + version: 20.1.3 repository: oci://tccr.io/truecharts condition: "" alias: "" @@ -36,4 +36,4 @@ sources: - https://hub.docker.com/r/ollama/ollama - https://ghcr.io/open-webui/open-webui type: application -version: 5.0.3 +version: 5.1.0 diff --git a/charts/stable/ollama/values.yaml b/charts/stable/ollama/values.yaml index ac369dc4c90..87e2332c869 100644 --- a/charts/stable/ollama/values.yaml +++ b/charts/stable/ollama/values.yaml @@ -1,7 +1,7 @@ image: repository: ollama/ollama pullPolicy: IfNotPresent - tag: 0.1.29@sha256:1cbc27cc9df6090128be39cfd720c2016b2b0f1230193eec522eba1b956b2acc + tag: 0.1.29@sha256:75fb97cdd8f435756d26eb7783599122b814c4b97da2012dc21ebc0efbd90fef uiImage: repository: ghcr.io/open-webui/open-webui pullPolicy: IfNotPresent @@ -13,7 +13,6 @@ service: ports: main: protocol: http - targetPort: 8080 port: 10686 targetSelector: ui api: @@ -29,6 +28,7 @@ service: ingress: api: + enabled: false targetSelector: api: api @@ -48,16 +48,16 @@ workload: enabled: true type: http path: /api/version - port: "{{ .Values.service.api.ports.api.port }}" + port: "{{ .Values.service.api.ports.api.targetPort }}" readiness: enabled: true type: http path: /api/version - port: "{{ .Values.service.api.ports.api.port }}" + port: "{{ .Values.service.api.ports.api.targetPort }}" startup: enabled: true type: tcp - port: "{{ .Values.service.api.ports.api.port }}" + port: "{{ .Values.service.api.ports.api.targetPort }}" ui: enabled: true type: Deployment @@ -77,18 +77,20 @@ workload: enabled: true type: http path: / - port: "{{ .Values.service.main.ports.main.targetPort }}" + port: "{{ .Values.service.main.ports.main.port }}" readiness: enabled: true type: http path: / - port: "{{ .Values.service.main.ports.main.targetPort }}" + port: "{{ .Values.service.main.ports.main.port }}" startup: enabled: true type: tcp - port: "{{ .Values.service.main.ports.main.targetPort }}" + port: "{{ .Values.service.main.ports.main.port }}" env: - OLLAMA_API_BASE_URL: '{{ printf "http://%v-api:%v/api" (include "tc.v1.common.lib.chart.names.fullname" $) .Values.service.api.ports.api.targetPort }}' + PORT: "{{ .Values.service.main.ports.main.port }}" + DATA_DIR: "{{ .Values.persistence.data.mountPath }}" + OLLAMA_BASE_URL: '{{ printf "http://%v-api:%v" (include "tc.v1.common.lib.chart.names.fullname" $) .Values.service.api.ports.api.targetPort }}' WEBUI_SECRET_KEY: secretKeyRef: name: ollama-secrets