From aa04934217772307c4b3cf962659d2dab334b8e5 Mon Sep 17 00:00:00 2001 From: robrakaric Date: Tue, 7 May 2024 12:47:57 -0700 Subject: [PATCH 1/5] separate openwebui from ollama chart --- .github/workflows/helm-release.yml | 4 + charts/open-webui/Chart.lock | 6 + charts/open-webui/Chart.yaml | 11 +- charts/open-webui/README.md | 88 +++++--------- charts/open-webui/charts/ollama-0.24.1.tgz | Bin 0 -> 10427 bytes charts/open-webui/templates/_helpers.tpl | 3 +- ...{webui-deployment.yaml => deployment.yaml} | 22 ++-- .../{webui-ingress.yaml => ingress.yaml} | 14 +-- .../open-webui/templates/ollama-service.yaml | 23 ---- .../templates/ollama-statefulset.yaml | 98 ---------------- charts/open-webui/templates/pvc.yaml | 27 +++++ charts/open-webui/templates/service.yaml | 29 +++++ charts/open-webui/templates/webui-pvc.yaml | 27 ----- .../open-webui/templates/webui-service.yaml | 29 ----- charts/open-webui/values-minikube.yaml | 26 ++--- charts/open-webui/values.yaml | 110 +++++++----------- 16 files changed, 179 insertions(+), 338 deletions(-) create mode 100644 charts/open-webui/Chart.lock create mode 100644 charts/open-webui/charts/ollama-0.24.1.tgz rename charts/open-webui/templates/{webui-deployment.yaml => deployment.yaml} (67%) rename charts/open-webui/templates/{webui-ingress.yaml => ingress.yaml} (66%) delete mode 100644 charts/open-webui/templates/ollama-service.yaml delete mode 100644 charts/open-webui/templates/ollama-statefulset.yaml create mode 100644 charts/open-webui/templates/pvc.yaml create mode 100644 charts/open-webui/templates/service.yaml delete mode 100644 charts/open-webui/templates/webui-pvc.yaml delete mode 100644 charts/open-webui/templates/webui-service.yaml diff --git a/.github/workflows/helm-release.yml b/.github/workflows/helm-release.yml index 2e77b3f..f101ab3 100644 --- a/.github/workflows/helm-release.yml +++ b/.github/workflows/helm-release.yml @@ -26,6 +26,10 @@ jobs: env: GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" + - name: Add Dependency Repos + run: | + helm repo add ollama https://otwld.github.io/ollama-helm/ + - name: Run chart-releaser uses: helm/chart-releaser-action@v1.6.0 with: diff --git a/charts/open-webui/Chart.lock b/charts/open-webui/Chart.lock new file mode 100644 index 0000000..b2cd7d9 --- /dev/null +++ b/charts/open-webui/Chart.lock @@ -0,0 +1,6 @@ +dependencies: +- name: ollama + repository: https://otwld.github.io/ollama-helm/ + version: 0.24.1 +digest: sha256:5f063bf2874fa7bbf38c3eb34094301f3a818cc13c0eeffb010dd09a42f0371d +generated: "2024-05-07T12:10:01.451609-07:00" diff --git a/charts/open-webui/Chart.yaml b/charts/open-webui/Chart.yaml index aafc28f..f0a4386 100644 --- a/charts/open-webui/Chart.yaml +++ b/charts/open-webui/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v2 name: open-webui -version: 1.0.1 +version: 2.0.0 appVersion: "latest" home: https://www.openwebui.com/ @@ -14,8 +14,15 @@ keywords: sources: - https://github.com/open-webui/helm-charts -- https://hub.docker.com/r/ollama/ollama - https://github.com/open-webui/open-webui/pkgs/container/open-webui +- https://github.com/otwld/ollama-helm/ +- https://hub.docker.com/r/ollama/ollama annotations: licenses: MIT + +dependencies: + - name: ollama + repository: https://otwld.github.io/ollama-helm/ + version: ">=0.24.0" + condition: ollama.enabled diff --git a/charts/open-webui/README.md b/charts/open-webui/README.md index 982ae9c..474832b 100644 --- a/charts/open-webui/README.md +++ b/charts/open-webui/README.md @@ -1,6 +1,6 @@ # open-webui -![Version: 1.0.0](https://img.shields.io/badge/Version-1.0.0-informational?style=flat-square) ![AppVersion: latest](https://img.shields.io/badge/AppVersion-latest-informational?style=flat-square) +![Version: 1.0.1](https://img.shields.io/badge/Version-1.0.1-informational?style=flat-square) ![AppVersion: latest](https://img.shields.io/badge/AppVersion-latest-informational?style=flat-square) Open WebUI: A User-Friendly Web Interface for Chat Interactions 👋 @@ -8,7 +8,7 @@ Open WebUI: A User-Friendly Web Interface for Chat Interactions 👋 ## Source Code -* +* * * @@ -31,61 +31,37 @@ helm upgrade --install open-webui open-webui/open-webui | Key | Type | Default | Description | |-----|------|---------|-------------| +| annotations | object | `{}` | | +| image.pullPolicy | string | `"Always"` | | +| image.repository | string | `"ghcr.io/open-webui/open-webui"` | | +| image.tag | string | `""` | | +| ingress.annotations | object | `{}` | Use appropriate annotations for your Ingress controller, e.g., for NGINX: nginx.ingress.kubernetes.io/rewrite-target: / | +| ingress.class | string | `""` | | +| ingress.enabled | bool | `false` | | +| ingress.existingSecret | string | `""` | | +| ingress.host | string | `""` | | +| ingress.tls | bool | `false` | | | nameOverride | string | `""` | | -| ollama.annotations | object | `{}` | | -| ollama.externalHost | string | `""` | | -| ollama.gpu.enabled | bool | `false` | Enable additional ENV values to help Ollama discover GPU usage | -| ollama.image.pullPolicy | string | `"Always"` | | -| ollama.image.repository | string | `"ollama/ollama"` | | -| ollama.image.tag | string | `"latest"` | | -| ollama.nodeSelector | object | `{}` | | -| ollama.persistence.accessModes[0] | string | `"ReadWriteOnce"` | | -| ollama.persistence.annotations | object | `{}` | | -| ollama.persistence.enabled | bool | `true` | | -| ollama.persistence.existingClaim | string | `""` | | -| ollama.persistence.selector | object | `{}` | | -| ollama.persistence.size | string | `"30Gi"` | | -| ollama.persistence.storageClass | string | `""` | | -| ollama.podAnnotations | object | `{}` | | -| ollama.replicaCount | int | `1` | | -| ollama.resources | object | `{}` | | -| ollama.runtimeClassName | string | `""` | If using a special runtime container such as nvidia, set it here. | -| ollama.service.annotations | object | `{}` | | -| ollama.service.containerPort | int | `11434` | | -| ollama.service.port | int | `80` | | -| ollama.service.type | string | `"ClusterIP"` | | -| ollama.tolerations[0].effect | string | `"NoSchedule"` | | -| ollama.tolerations[0].key | string | `"nvidia.com/gpu"` | | -| ollama.tolerations[0].operator | string | `"Exists"` | | -| webui.annotations | object | `{}` | | -| webui.image.pullPolicy | string | `"Always"` | | -| webui.image.repository | string | `"ghcr.io/open-webui/open-webui"` | | -| webui.image.tag | string | `""` | | -| webui.ingress.annotations | object | `{}` | Use appropriate annotations for your Ingress controller, e.g., for NGINX: nginx.ingress.kubernetes.io/rewrite-target: / | -| webui.ingress.class | string | `""` | | -| webui.ingress.enabled | bool | `false` | | -| webui.ingress.existingSecret | string | `""` | | -| webui.ingress.host | string | `""` | | -| webui.ingress.tls | bool | `false` | | -| webui.nodeSelector | object | `{}` | | -| webui.persistence.accessModes | list | `["ReadWriteOnce"]` | If using multiple replicas, you must update accessModes to ReadWriteMany | -| webui.persistence.annotations | object | `{}` | | -| webui.persistence.enabled | bool | `true` | | -| webui.persistence.existingClaim | string | `""` | | -| webui.persistence.selector | object | `{}` | | -| webui.persistence.size | string | `"2Gi"` | | -| webui.persistence.storageClass | string | `""` | | -| webui.podAnnotations | object | `{}` | | -| webui.replicaCount | int | `1` | | -| webui.resources | object | `{}` | | -| webui.service.annotations | object | `{}` | | -| webui.service.containerPort | int | `8080` | | -| webui.service.labels | object | `{}` | | -| webui.service.loadBalancerClass | string | `""` | | -| webui.service.nodePort | string | `""` | | -| webui.service.port | int | `80` | | -| webui.service.type | string | `"ClusterIP"` | | -| webui.tolerations | list | `[]` | | +| nodeSelector | object | `{}` | | +| ollama.enabled | bool | `false` | 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 | +| persistence.accessModes | list | `["ReadWriteOnce"]` | If using multiple replicas, you must update accessModes to ReadWriteMany | +| persistence.annotations | object | `{}` | | +| persistence.enabled | bool | `true` | | +| persistence.existingClaim | string | `""` | | +| persistence.selector | object | `{}` | | +| persistence.size | string | `"2Gi"` | | +| persistence.storageClass | string | `""` | | +| podAnnotations | object | `{}` | | +| replicaCount | int | `1` | | +| resources | object | `{}` | | +| service.annotations | object | `{}` | | +| service.containerPort | int | `8080` | | +| service.labels | object | `{}` | | +| service.loadBalancerClass | string | `""` | | +| service.nodePort | string | `""` | | +| service.port | int | `80` | | +| service.type | string | `"ClusterIP"` | | +| tolerations | list | `[]` | | ---------------------------------------------- diff --git a/charts/open-webui/charts/ollama-0.24.1.tgz b/charts/open-webui/charts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n;F^7VC3k*3|PXv#Si^FYT!jH<};BDndygpo-Y#mN&$N-~Kb44wv08%4c zE_fP+=q9qJWdnw|S;nrnN*Ic!sh-dEG^v+}mR=^&s@w-+6CO*L)0he*BF!hr%*R}I z7`sR8);wd*yEPvsO6eCKagdkFZS5A%4x8Qxcx#yL54!Nf(!^}Y@w_&C&jq0J&@9;p zna=0=jqZ?;$sjemc*#^NW@|y^yHaL)&1=Ly`@+toOerK}PPh2ni-qOh$B=@{8RIjz zSR_dzT~nJlX18FhZ4|V3vRz}A947TDS(~yn^kHl?$y-VjV6pcE zmJA~rh^p2@Y#LWyTQ6Rjf(0>)RI_I;1j*t6v3gG+BGOX96x@*#>NA>9v+~U1Mhawa zSsYpi4k|qwyrrS{1S2RMU+NuM`KU-=Wg8k{N;G9TC`RQz+@X(BvXBZ(u=gY<*RH_d zusEdeaC5;M?5TVYAR?GE)d-p?2szd8(A?6H7DO&GI{@1s@TE4BtxJC@NE|HCnJUfJ z+8h!3k}bH=4ZZE~Y{*SYi@U*aQ2`Tw(k!M3g#axuhW@ibgBnd*T(09iH{z zFbHO0cN(^XgTtft@i#}b{r8jENt;fOk56Xgo9A5;cm`w7E5d*C04Cg=vm`9)fuh0U lf4P0(&%~cS2)|xmudmnF>rc4;e*gdg|Nk;arfvYb008FVcB23Q literal 0 HcmV?d00001 diff --git a/charts/open-webui/templates/_helpers.tpl b/charts/open-webui/templates/_helpers.tpl index 6233efa..3213ee7 100644 --- a/charts/open-webui/templates/_helpers.tpl +++ b/charts/open-webui/templates/_helpers.tpl @@ -1,14 +1,13 @@ {{- define "open-webui.name" -}} {{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }} {{- end -}} - {{- define "ollama.name" -}} ollama {{- end -}} {{- define "ollama.url" -}} {{- if .Values.ollama.externalHost }} -{{- printf .Values.ollama.externalHost }} +{{- printf .Values.externalHost }} {{- else }} {{- printf "http://%s.%s.svc.cluster.local:%d" (include "ollama.name" .) (.Release.Namespace) (.Values.ollama.service.port | int) }} {{- end }} diff --git a/charts/open-webui/templates/webui-deployment.yaml b/charts/open-webui/templates/deployment.yaml similarity index 67% rename from charts/open-webui/templates/webui-deployment.yaml rename to charts/open-webui/templates/deployment.yaml index bbd5706..0725756 100644 --- a/charts/open-webui/templates/webui-deployment.yaml +++ b/charts/open-webui/templates/deployment.yaml @@ -4,12 +4,12 @@ metadata: name: {{ include "open-webui.name" . }} labels: {{- include "open-webui.labels" . | nindent 4 }} - {{- with .Values.webui.annotations }} + {{- with .Values.annotations }} annotations: {{- toYaml . | nindent 4 }} {{- end }} spec: - replicas: {{ .Values.webui.replicaCount }} + replicas: {{ .Values.replicaCount }} selector: matchLabels: {{- include "open-webui.selectorLabels" . | nindent 6 }} @@ -17,7 +17,7 @@ spec: metadata: labels: {{- include "open-webui.labels" . | nindent 8 }} - {{- with .Values.webui.podAnnotations }} + {{- with .Values.podAnnotations }} annotations: {{- toYaml . | nindent 8 }} {{- end }} @@ -26,14 +26,14 @@ spec: automountServiceAccountToken: false containers: - name: {{ .Chart.Name }} - {{- with .Values.webui.image }} + {{- with .Values.image }} image: {{ .repository }}:{{ .tag | default $.Chart.AppVersion }} imagePullPolicy: {{ .pullPolicy }} {{- end }} ports: - name: http - containerPort: {{ .Values.webui.service.containerPort }} - {{- with .Values.webui.resources }} + containerPort: {{ .Values.service.containerPort }} + {{- with .Values.resources }} resources: {{- toYaml . | nindent 10 }} {{- end }} volumeMounts: @@ -43,19 +43,19 @@ spec: - name: OLLAMA_BASE_URL value: {{ include "ollama.url" . | quote }} tty: true - {{- with .Values.webui.nodeSelector }} + {{- with .Values.nodeSelector }} nodeSelector: {{- toYaml . | nindent 8 }} {{- end }} volumes: - {{- if and .Values.webui.persistence.enabled .Values.webui.persistence.existingClaim }} + {{- if and .Values.persistence.enabled .Values.persistence.existingClaim }} - name: data persistentVolumeClaim: - claimName: {{ .Values.webui.persistence.existingClaim }} - {{- else if not .Values.webui.persistence.enabled }} + claimName: {{ .Values.persistence.existingClaim }} + {{- else if not .Values.persistence.enabled }} - name: data emptyDir: {} - {{- else if and .Values.webui.persistence.enabled (not .Values.webui.persistence.existingClaim) }} + {{- else if and .Values.persistence.enabled (not .Values.persistence.existingClaim) }} - name: data persistentVolumeClaim: claimName: {{ include "open-webui.name" . }} diff --git a/charts/open-webui/templates/webui-ingress.yaml b/charts/open-webui/templates/ingress.yaml similarity index 66% rename from charts/open-webui/templates/webui-ingress.yaml rename to charts/open-webui/templates/ingress.yaml index ea9f95e..12e3a28 100644 --- a/charts/open-webui/templates/webui-ingress.yaml +++ b/charts/open-webui/templates/ingress.yaml @@ -1,26 +1,26 @@ -{{- if .Values.webui.ingress.enabled }} +{{- if .Values.ingress.enabled }} apiVersion: networking.k8s.io/v1 kind: Ingress metadata: name: {{ include "open-webui.name" . }} labels: {{- include "open-webui.labels" . | nindent 4 }} - {{- with .Values.webui.ingress.annotations }} + {{- with .Values.ingress.annotations }} annotations: {{- toYaml . | nindent 4 }} {{- end }} spec: - {{- with .Values.webui.ingress.class }} + {{- with .Values.ingress.class }} ingressClassName: {{ . }} {{- end }} - {{- if .Values.webui.ingress.tls }} + {{- if .Values.ingress.tls }} tls: - hosts: - - {{ .Values.webui.ingress.host | quote }} - secretName: {{ default (printf "%s-tls" .Release.Name) .Values.webui.ingress.existingSecret }} + - {{ .Values.ingress.host | quote }} + secretName: {{ default (printf "%s-tls" .Release.Name) .Values.ingress.existingSecret }} {{- end }} rules: - - host: {{ .Values.webui.ingress.host }} + - host: {{ .Values.ingress.host }} http: paths: - path: / diff --git a/charts/open-webui/templates/ollama-service.yaml b/charts/open-webui/templates/ollama-service.yaml deleted file mode 100644 index 32c93ca..0000000 --- a/charts/open-webui/templates/ollama-service.yaml +++ /dev/null @@ -1,23 +0,0 @@ -{{- if not .Values.ollama.externalHost }} -apiVersion: v1 -kind: Service -metadata: - name: {{ include "ollama.name" . }} - labels: - {{- include "ollama.labels" . | nindent 4 }} - {{- with .Values.ollama.service.annotations }} - annotations: - {{- toYaml . | nindent 4 }} - {{- end }} -spec: - selector: - {{- include "ollama.selectorLabels" . | nindent 4 }} -{{- with .Values.ollama.service }} - type: {{ .type }} - ports: - - protocol: TCP - name: http - port: {{ .port }} - targetPort: http -{{- end }} -{{- end }} diff --git a/charts/open-webui/templates/ollama-statefulset.yaml b/charts/open-webui/templates/ollama-statefulset.yaml deleted file mode 100644 index 2750956..0000000 --- a/charts/open-webui/templates/ollama-statefulset.yaml +++ /dev/null @@ -1,98 +0,0 @@ -{{- if not .Values.ollama.externalHost }} -apiVersion: apps/v1 -kind: StatefulSet -metadata: - name: {{ include "ollama.name" . }} - labels: - {{- include "ollama.labels" . | nindent 4 }} - {{- with .Values.ollama.annotations }} - annotations: - {{- toYaml . | nindent 4 }} - {{- end }} -spec: - serviceName: {{ include "ollama.name" . }} - replicas: {{ .Values.ollama.replicaCount }} - selector: - matchLabels: - {{- include "ollama.selectorLabels" . | nindent 6 }} - template: - metadata: - labels: - {{- include "ollama.labels" . | nindent 8 }} - {{- with .Values.ollama.podAnnotations }} - annotations: - {{- toYaml . | nindent 8 }} - {{- end }} - spec: - enableServiceLinks: false - automountServiceAccountToken: false - {{- with .Values.ollama.runtimeClassName }} - runtimeClassName: {{ . }} - {{- end }} - containers: - - name: {{ include "ollama.name" . }} - {{- with .Values.ollama.image }} - image: {{ .repository }}:{{ .tag }} - imagePullPolicy: {{ .pullPolicy }} - {{- end }} - tty: true - ports: - - name: http - containerPort: {{ .Values.ollama.service.containerPort }} - env: - {{- if .Values.ollama.gpu.enabled }} - - name: PATH - value: /usr/local/nvidia/bin:/usr/local/cuda/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin - - name: LD_LIBRARY_PATH - value: /usr/local/nvidia/lib:/usr/local/nvidia/lib64 - - name: NVIDIA_DRIVER_CAPABILITIES - value: compute,utility - {{- end }} - {{- with .Values.ollama.resources }} - resources: {{- toYaml . | nindent 10 }} - {{- end }} - volumeMounts: - - name: data - mountPath: /root/.ollama - {{- with .Values.ollama.nodeSelector }} - nodeSelector: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.ollama.tolerations }} - tolerations: - {{- toYaml . | nindent 8 }} - {{- end }} - volumes: - {{- if and .Values.ollama.persistence.enabled .Values.ollama.persistence.existingClaim }} - - name: data - persistentVolumeClaim: - claimName: {{ .Values.ollama.persistence.existingClaim }} - {{- else if not .Values.ollama.persistence.enabled }} - - name: data - emptyDir: {} - {{- else if and .Values.ollama.persistence.enabled (not .Values.ollama.persistence.existingClaim) }} - [] - volumeClaimTemplates: - - metadata: - name: data - labels: - {{- include "ollama.selectorLabels" . | nindent 8 }} - {{- with .Values.ollama.persistence.annotations }} - annotations: - {{- toYaml . | nindent 8 }} - {{- end }} - spec: - accessModes: - {{- range .Values.ollama.persistence.accessModes }} - - {{ . | quote }} - {{- end }} - resources: - requests: - storage: {{ .Values.ollama.persistence.size | quote }} - storageClassName: {{ .Values.ollama.persistence.storageClass }} - {{- with .Values.ollama.persistence.selector }} - selector: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- end }} -{{- end }} diff --git a/charts/open-webui/templates/pvc.yaml b/charts/open-webui/templates/pvc.yaml new file mode 100644 index 0000000..529ef43 --- /dev/null +++ b/charts/open-webui/templates/pvc.yaml @@ -0,0 +1,27 @@ +{{- if and .Values.persistence.enabled (not .Values.persistence.existingClaim) }} +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: {{ include "open-webui.name" . }} + labels: + {{- include "open-webui.selectorLabels" . | nindent 4 }} + {{- with .Values.persistence.annotations }} + annotations: + {{- toYaml . | nindent 8 }} + {{- end }} +spec: + accessModes: + {{- range .Values.persistence.accessModes }} + - {{ . | quote }} + {{- end }} + resources: + requests: + storage: {{ .Values.persistence.size }} + {{- if .Values.persistence.storageClass }} + storageClassName: {{ .Values.persistence.storageClass }} + {{- end }} + {{- with .Values.persistence.selector }} + selector: + {{- toYaml . | nindent 4 }} + {{- end }} +{{- end }} diff --git a/charts/open-webui/templates/service.yaml b/charts/open-webui/templates/service.yaml new file mode 100644 index 0000000..19d93f3 --- /dev/null +++ b/charts/open-webui/templates/service.yaml @@ -0,0 +1,29 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ include "open-webui.name" . }} + labels: + {{- include "open-webui.labels" . | nindent 4 }} + {{- with .Values.service.labels }} + {{- toYaml . | nindent 4 }} + {{- end }} + {{- with .Values.service.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} +spec: + selector: + {{- include "open-webui.selectorLabels" . | nindent 4 }} + type: {{ .Values.service.type | default "ClusterIP" }} + ports: + - protocol: TCP + name: http + port: {{ .Values.service.port }} + targetPort: http + {{- if .Values.service.nodePort }} + nodePort: {{ .Values.service.nodePort | int }} + {{- end }} + {{- if .Values.service.loadBalancerClass }} + loadBalancerClass: {{ .Values.service.loadBalancerClass | quote }} + {{- end }} + \ No newline at end of file diff --git a/charts/open-webui/templates/webui-pvc.yaml b/charts/open-webui/templates/webui-pvc.yaml deleted file mode 100644 index 8783324..0000000 --- a/charts/open-webui/templates/webui-pvc.yaml +++ /dev/null @@ -1,27 +0,0 @@ -{{- if and .Values.webui.persistence.enabled (not .Values.webui.persistence.existingClaim) }} -apiVersion: v1 -kind: PersistentVolumeClaim -metadata: - name: {{ include "open-webui.name" . }} - labels: - {{- include "open-webui.selectorLabels" . | nindent 4 }} - {{- with .Values.webui.persistence.annotations }} - annotations: - {{- toYaml . | nindent 8 }} - {{- end }} -spec: - accessModes: - {{- range .Values.webui.persistence.accessModes }} - - {{ . | quote }} - {{- end }} - resources: - requests: - storage: {{ .Values.webui.persistence.size }} - {{- if .Values.webui.persistence.storageClass }} - storageClassName: {{ .Values.webui.persistence.storageClass }} - {{- end }} - {{- with .Values.webui.persistence.selector }} - selector: - {{- toYaml . | nindent 4 }} - {{- end }} -{{- end }} diff --git a/charts/open-webui/templates/webui-service.yaml b/charts/open-webui/templates/webui-service.yaml deleted file mode 100644 index 9ccd9b9..0000000 --- a/charts/open-webui/templates/webui-service.yaml +++ /dev/null @@ -1,29 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: {{ include "open-webui.name" . }} - labels: - {{- include "open-webui.labels" . | nindent 4 }} - {{- with .Values.webui.service.labels }} - {{- toYaml . | nindent 4 }} - {{- end }} - {{- with .Values.webui.service.annotations }} - annotations: - {{- toYaml . | nindent 4 }} - {{- end }} -spec: - selector: - {{- include "open-webui.selectorLabels" . | nindent 4 }} - type: {{ .Values.webui.service.type | default "ClusterIP" }} - ports: - - protocol: TCP - name: http - port: {{ .Values.webui.service.port }} - targetPort: http - {{- if .Values.webui.service.nodePort }} - nodePort: {{ .Values.webui.service.nodePort | int }} - {{- end }} - {{- if .Values.webui.service.loadBalancerClass }} - loadBalancerClass: {{ .Values.webui.service.loadBalancerClass | quote }} - {{- end }} - diff --git a/charts/open-webui/values-minikube.yaml b/charts/open-webui/values-minikube.yaml index 1b67b0b..14e0ca0 100644 --- a/charts/open-webui/values-minikube.yaml +++ b/charts/open-webui/values-minikube.yaml @@ -12,16 +12,16 @@ ollama: gpu: enabled: false -webui: - resources: - requests: - cpu: "500m" - memory: "500Mi" - limits: - cpu: "1000m" - memory: "1Gi" - ingress: - enabled: true - host: open-webui.minikube.local - service: - type: NodePort + +resources: + requests: + cpu: "500m" + memory: "500Mi" + limits: + cpu: "1000m" + memory: "1Gi" +ingress: + enabled: true + host: open-webui.minikube.local +service: + type: NodePort diff --git a/charts/open-webui/values.yaml b/charts/open-webui/values.yaml index 4437973..4404877 100644 --- a/charts/open-webui/values.yaml +++ b/charts/open-webui/values.yaml @@ -1,75 +1,45 @@ nameOverride: "" ollama: - externalHost: "" - annotations: {} - podAnnotations: {} - replicaCount: 1 - image: - repository: ollama/ollama - tag: latest - pullPolicy: Always - resources: {} - persistence: - enabled: true - size: 30Gi - existingClaim: "" - accessModes: - - ReadWriteOnce - storageClass: "" - selector: {} - annotations: {} - nodeSelector: {} - # -- If using a special runtime container such as nvidia, set it here. - runtimeClassName: "" - tolerations: - - key: nvidia.com/gpu - operator: Exists - effect: NoSchedule - service: - type: ClusterIP - annotations: {} - port: 80 - containerPort: 11434 - gpu: - # -- Enable additional ENV values to help Ollama discover GPU usage - enabled: false + # -- 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: false -webui: +externalHosts: + +annotations: {} +podAnnotations: {} +replicaCount: 1 +image: + repository: ghcr.io/open-webui/open-webui + tag: "" + pullPolicy: Always +resources: {} +ingress: + enabled: false + class: "" + # -- Use appropriate annotations for your Ingress controller, e.g., for NGINX: + # nginx.ingress.kubernetes.io/rewrite-target: / annotations: {} - podAnnotations: {} - replicaCount: 1 - image: - repository: ghcr.io/open-webui/open-webui - tag: "" - pullPolicy: Always - resources: {} - ingress: - enabled: false - class: "" - # -- Use appropriate annotations for your Ingress controller, e.g., for NGINX: - # nginx.ingress.kubernetes.io/rewrite-target: / - annotations: {} - host: "" - tls: false - existingSecret: "" - persistence: - enabled: true - size: 2Gi - existingClaim: "" - # -- If using multiple replicas, you must update accessModes to ReadWriteMany - accessModes: - - ReadWriteOnce - storageClass: "" - selector: {} - annotations: {} - nodeSelector: {} - tolerations: [] - service: - type: ClusterIP - annotations: {} - port: 80 - containerPort: 8080 - nodePort: "" - labels: {} - loadBalancerClass: "" + host: "" + tls: false + existingSecret: "" +persistence: + enabled: true + size: 2Gi + existingClaim: "" + # -- If using multiple replicas, you must update accessModes to ReadWriteMany + accessModes: + - ReadWriteOnce + storageClass: "" + selector: {} + annotations: {} +nodeSelector: {} +tolerations: [] +service: + type: ClusterIP + annotations: {} + port: 80 + containerPort: 8080 + nodePort: "" + labels: {} + loadBalancerClass: "" From 827d0f0deed190a91b4622a7b0c82cea03196723 Mon Sep 17 00:00:00 2001 From: robrakaric Date: Tue, 7 May 2024 14:12:36 -0700 Subject: [PATCH 2/5] make ollama install work with external urls --- charts/open-webui/Chart.lock | 4 ++-- charts/open-webui/Chart.yaml | 4 ++++ charts/open-webui/README.md | 15 +++++++++++--- charts/open-webui/templates/_helpers.tpl | 23 ++++++++++++++++----- charts/open-webui/templates/deployment.yaml | 4 ++-- charts/open-webui/values.yaml | 8 +++++-- 6 files changed, 44 insertions(+), 14 deletions(-) diff --git a/charts/open-webui/Chart.lock b/charts/open-webui/Chart.lock index b2cd7d9..6a2bc0f 100644 --- a/charts/open-webui/Chart.lock +++ b/charts/open-webui/Chart.lock @@ -2,5 +2,5 @@ dependencies: - name: ollama repository: https://otwld.github.io/ollama-helm/ version: 0.24.1 -digest: sha256:5f063bf2874fa7bbf38c3eb34094301f3a818cc13c0eeffb010dd09a42f0371d -generated: "2024-05-07T12:10:01.451609-07:00" +digest: sha256:81e6126e017a7063c0074cf7b38bca8537d220053255f0669c98a6f67e9360e6 +generated: "2024-05-07T13:24:36.081504-07:00" diff --git a/charts/open-webui/Chart.yaml b/charts/open-webui/Chart.yaml index f0a4386..3507d85 100644 --- a/charts/open-webui/Chart.yaml +++ b/charts/open-webui/Chart.yaml @@ -25,4 +25,8 @@ dependencies: - name: ollama repository: https://otwld.github.io/ollama-helm/ version: ">=0.24.0" + import-values: + + - child: service + parent: ollama.service condition: ollama.enabled diff --git a/charts/open-webui/README.md b/charts/open-webui/README.md index 474832b..5ea1619 100644 --- a/charts/open-webui/README.md +++ b/charts/open-webui/README.md @@ -1,6 +1,6 @@ # open-webui -![Version: 1.0.1](https://img.shields.io/badge/Version-1.0.1-informational?style=flat-square) ![AppVersion: latest](https://img.shields.io/badge/AppVersion-latest-informational?style=flat-square) +![Version: 2.0.0](https://img.shields.io/badge/Version-2.0.0-informational?style=flat-square) ![AppVersion: latest](https://img.shields.io/badge/AppVersion-latest-informational?style=flat-square) Open WebUI: A User-Friendly Web Interface for Chat Interactions 👋 @@ -9,8 +9,9 @@ Open WebUI: A User-Friendly Web Interface for Chat Interactions 👋 ## Source Code * -* * +* +* ## Installing @@ -27,11 +28,19 @@ Now you can install the chart: helm upgrade --install open-webui open-webui/open-webui ``` +## Requirements + +| Repository | Name | Version | +|------------|------|---------| +| https://otwld.github.io/ollama-helm/ | ollama | >=0.24.0 | + ## Values | Key | Type | Default | Description | |-----|------|---------|-------------| | 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 | `""` | | @@ -43,7 +52,7 @@ helm upgrade --install open-webui open-webui/open-webui | ingress.tls | bool | `false` | | | nameOverride | string | `""` | | | nodeSelector | object | `{}` | | -| ollama.enabled | bool | `false` | 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 | +| 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 | | 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 3213ee7..3ee0785 100644 --- a/charts/open-webui/templates/_helpers.tpl +++ b/charts/open-webui/templates/_helpers.tpl @@ -5,14 +5,27 @@ ollama {{- end -}} -{{- define "ollama.url" -}} -{{- if .Values.ollama.externalHost }} -{{- printf .Values.externalHost }} -{{- else }} -{{- printf "http://%s.%s.svc.cluster.local:%d" (include "ollama.name" .) (.Release.Namespace) (.Values.ollama.service.port | int) }} +{{- define "externalHostUrls" -}} +{{- if .Values.externalHosts }} +{{- join ";" .Values.externalHosts }} {{- end }} {{- end }} +{{- define "ollamaLocalUrl" -}} +{{- if .Values.ollama.enabled -}} +{{- $clusterDomain := .Values.clusterDomain }} +{{- $ollamaServicePort := .Values.ollama.service.port | toString }} +{{- printf "http://open-webui-%s.%s.svc.%s:%s" (include "ollama.name" .) (.Release.Namespace) $clusterDomain $ollamaServicePort }} +{{- end }} +{{- end }} + +{{- define "ollamaBaseUrls" -}} +{{- $ollamaLocalUrl := include "ollamaLocalUrl" . }} +{{- $externalHostUrls := include "externalHostUrls" . }} +{{- printf "%s;%s" $externalHostUrls $ollamaLocalUrl -}} +{{- end }} + + {{- define "chart.name" -}} {{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} {{- end }} diff --git a/charts/open-webui/templates/deployment.yaml b/charts/open-webui/templates/deployment.yaml index 0725756..6a2b8c1 100644 --- a/charts/open-webui/templates/deployment.yaml +++ b/charts/open-webui/templates/deployment.yaml @@ -40,8 +40,8 @@ spec: - name: data mountPath: /app/backend/data env: - - name: OLLAMA_BASE_URL - value: {{ include "ollama.url" . | quote }} + - name: OLLAMA_BASE_URLS + value: {{ include "ollamaBaseUrls" . | quote }} tty: true {{- with .Values.nodeSelector }} nodeSelector: diff --git a/charts/open-webui/values.yaml b/charts/open-webui/values.yaml index 4404877..721e701 100644 --- a/charts/open-webui/values.yaml +++ b/charts/open-webui/values.yaml @@ -2,9 +2,13 @@ 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: false + enabled: true -externalHosts: +# -- 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: [] + +# -- Value of cluster domain +clusterDomain: cluster.local annotations: {} podAnnotations: {} From 997e88f6b60921936b3fc3a9076d698184a5a483 Mon Sep 17 00:00:00 2001 From: robrakaric Date: Tue, 7 May 2024 14:14:55 -0700 Subject: [PATCH 3/5] add path to chart-release workflow --- .github/workflows/helm-release.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/helm-release.yml b/.github/workflows/helm-release.yml index f101ab3..ca5dbc8 100644 --- a/.github/workflows/helm-release.yml +++ b/.github/workflows/helm-release.yml @@ -4,6 +4,8 @@ on: push: branches: - main + paths: + - "charts/*/Chart.yaml" jobs: release: From 4e0b38bc1d890a6ad0737b18c16e960905791a9c Mon Sep 17 00:00:00 2001 From: robrakaric Date: Tue, 7 May 2024 16:40:28 -0700 Subject: [PATCH 4/5] added logic to prevent blank url entry and trim trailing slash --- charts/open-webui/templates/_helpers.tpl | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/charts/open-webui/templates/_helpers.tpl b/charts/open-webui/templates/_helpers.tpl index 3ee0785..212d00a 100644 --- a/charts/open-webui/templates/_helpers.tpl +++ b/charts/open-webui/templates/_helpers.tpl @@ -7,7 +7,7 @@ ollama {{- define "externalHostUrls" -}} {{- if .Values.externalHosts }} -{{- join ";" .Values.externalHosts }} +{{- join ";" .Values.externalHosts | trimSuffix "/" }} {{- end }} {{- end }} @@ -22,9 +22,14 @@ ollama {{- define "ollamaBaseUrls" -}} {{- $ollamaLocalUrl := include "ollamaLocalUrl" . }} {{- $externalHostUrls := include "externalHostUrls" . }} -{{- printf "%s;%s" $externalHostUrls $ollamaLocalUrl -}} +{{- if and .Values.ollama.enabled .Values.externalHosts }} +{{- printf "%s;%s" $externalHostUrls $ollamaLocalUrl }} +{{- else if .Values.ollama.enabled }} +{{- printf "%s" $ollamaLocalUrl }} +{{- else if .Values.externalHosts }} +{{- printf "%s" $externalHostUrls }} +{{- end }} {{- end }} - {{- define "chart.name" -}} {{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} From 46c7ba62565f66f55ca4c92d971332ef777ef6dc Mon Sep 17 00:00:00 2001 From: robrakaric Date: Wed, 8 May 2024 14:17:34 -0700 Subject: [PATCH 5/5] 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