separate openwebui from ollama chart

This commit is contained in:
robrakaric 2024-05-07 12:47:57 -07:00
parent 725043ee13
commit aa04934217
No known key found for this signature in database
GPG Key ID: 2C5BDB4E806BE943
16 changed files with 179 additions and 338 deletions

View File

@ -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:

View File

@ -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"

View File

@ -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

View File

@ -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
* <https://github.com/open-webui/open-webui/tree/main/kubernetes/helm>
* <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>
@ -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 | `[]` | |
----------------------------------------------

Binary file not shown.

View File

@ -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 }}

View File

@ -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" . }}

View File

@ -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: /

View File

@ -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 }}

View File

@ -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 }}

View File

@ -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 }}

View File

@ -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 }}

View File

@ -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 }}

View File

@ -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 }}

View File

@ -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

View File

@ -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: ""