From 770c6f210cda49089338b2b2009f4d1956a2005d Mon Sep 17 00:00:00 2001 From: duhow Date: Mon, 19 Feb 2024 21:49:30 +0100 Subject: [PATCH 01/27] remove namespace --- kubernetes/helm/templates/ollama-namespace.yaml | 4 ---- kubernetes/helm/templates/ollama-service.yaml | 3 +-- kubernetes/helm/templates/ollama-statefulset.yaml | 3 +-- kubernetes/helm/templates/webui-deployment.yaml | 3 +-- kubernetes/helm/templates/webui-ingress.yaml | 1 - kubernetes/helm/templates/webui-pvc.yaml | 5 ++--- kubernetes/helm/templates/webui-service.yaml | 3 +-- kubernetes/helm/values.yaml | 4 +--- 8 files changed, 7 insertions(+), 19 deletions(-) delete mode 100644 kubernetes/helm/templates/ollama-namespace.yaml diff --git a/kubernetes/helm/templates/ollama-namespace.yaml b/kubernetes/helm/templates/ollama-namespace.yaml deleted file mode 100644 index 59f79447..00000000 --- a/kubernetes/helm/templates/ollama-namespace.yaml +++ /dev/null @@ -1,4 +0,0 @@ -apiVersion: v1 -kind: Namespace -metadata: - name: {{ .Values.namespace }} \ No newline at end of file diff --git a/kubernetes/helm/templates/ollama-service.yaml b/kubernetes/helm/templates/ollama-service.yaml index 54558473..a993b618 100644 --- a/kubernetes/helm/templates/ollama-service.yaml +++ b/kubernetes/helm/templates/ollama-service.yaml @@ -2,7 +2,6 @@ apiVersion: v1 kind: Service metadata: name: ollama-service - namespace: {{ .Values.namespace }} spec: type: {{ .Values.ollama.service.type }} selector: @@ -10,4 +9,4 @@ spec: ports: - protocol: TCP port: {{ .Values.ollama.servicePort }} - targetPort: {{ .Values.ollama.servicePort }} \ No newline at end of file + targetPort: {{ .Values.ollama.servicePort }} diff --git a/kubernetes/helm/templates/ollama-statefulset.yaml b/kubernetes/helm/templates/ollama-statefulset.yaml index 83cb6883..76b1988f 100644 --- a/kubernetes/helm/templates/ollama-statefulset.yaml +++ b/kubernetes/helm/templates/ollama-statefulset.yaml @@ -2,7 +2,6 @@ apiVersion: apps/v1 kind: StatefulSet metadata: name: ollama - namespace: {{ .Values.namespace }} spec: serviceName: "ollama" replicas: {{ .Values.ollama.replicaCount }} @@ -52,4 +51,4 @@ spec: accessModes: [ "ReadWriteOnce" ] resources: requests: - storage: {{ .Values.ollama.volumeSize }} \ No newline at end of file + storage: {{ .Values.ollama.volumeSize }} diff --git a/kubernetes/helm/templates/webui-deployment.yaml b/kubernetes/helm/templates/webui-deployment.yaml index 08c96688..af42ceca 100644 --- a/kubernetes/helm/templates/webui-deployment.yaml +++ b/kubernetes/helm/templates/webui-deployment.yaml @@ -2,7 +2,6 @@ apiVersion: apps/v1 kind: Deployment metadata: name: open-webui-deployment - namespace: {{ .Values.namespace }} spec: replicas: 1 selector: @@ -35,4 +34,4 @@ spec: volumes: - name: webui-volume persistentVolumeClaim: - claimName: open-webui-pvc \ No newline at end of file + claimName: open-webui-pvc diff --git a/kubernetes/helm/templates/webui-ingress.yaml b/kubernetes/helm/templates/webui-ingress.yaml index cbd456d3..28b90dc4 100644 --- a/kubernetes/helm/templates/webui-ingress.yaml +++ b/kubernetes/helm/templates/webui-ingress.yaml @@ -3,7 +3,6 @@ apiVersion: networking.k8s.io/v1 kind: Ingress metadata: name: open-webui-ingress - namespace: {{ .Values.namespace }} {{- if .Values.webui.ingress.annotations }} annotations: {{ toYaml .Values.webui.ingress.annotations | trimSuffix "\n" | indent 4 }} diff --git a/kubernetes/helm/templates/webui-pvc.yaml b/kubernetes/helm/templates/webui-pvc.yaml index d090fe87..0db77c67 100644 --- a/kubernetes/helm/templates/webui-pvc.yaml +++ b/kubernetes/helm/templates/webui-pvc.yaml @@ -1,12 +1,11 @@ apiVersion: v1 kind: PersistentVolumeClaim metadata: + name: open-webui-pvc labels: app: open-webui - name: open-webui-pvc - namespace: {{ .Values.namespace }} spec: accessModes: [ "ReadWriteOnce" ] resources: requests: - storage: {{ .Values.webui.volumeSize }} \ No newline at end of file + storage: {{ .Values.webui.volumeSize }} diff --git a/kubernetes/helm/templates/webui-service.yaml b/kubernetes/helm/templates/webui-service.yaml index afd526a1..8a96bd15 100644 --- a/kubernetes/helm/templates/webui-service.yaml +++ b/kubernetes/helm/templates/webui-service.yaml @@ -2,7 +2,6 @@ apiVersion: v1 kind: Service metadata: name: open-webui-service - namespace: {{ .Values.namespace }} spec: type: {{ .Values.webui.service.type }} # Default: NodePort # Use LoadBalancer if you're on a cloud that supports it selector: @@ -12,4 +11,4 @@ spec: port: {{ .Values.webui.servicePort }} targetPort: {{ .Values.webui.servicePort }} # If using NodePort, you can optionally specify the nodePort: - # nodePort: 30000 \ No newline at end of file + # nodePort: 30000 diff --git a/kubernetes/helm/values.yaml b/kubernetes/helm/values.yaml index 63781f6c..ff96fa27 100644 --- a/kubernetes/helm/values.yaml +++ b/kubernetes/helm/values.yaml @@ -1,5 +1,3 @@ -namespace: open-webui - ollama: replicaCount: 1 image: ollama/ollama:latest @@ -41,4 +39,4 @@ webui: nodeSelector: {} tolerations: [] service: - type: NodePort \ No newline at end of file + type: NodePort From cbaada1410bbfb6caa0f4b5726b30a499ed30616 Mon Sep 17 00:00:00 2001 From: duhow Date: Mon, 19 Feb 2024 21:58:25 +0100 Subject: [PATCH 02/27] add define names --- kubernetes/helm/templates/_helpers.tpl | 7 +++++++ kubernetes/helm/templates/ollama-service.yaml | 2 +- kubernetes/helm/templates/ollama-statefulset.yaml | 4 ++-- kubernetes/helm/templates/webui-deployment.yaml | 8 ++++---- kubernetes/helm/templates/webui-ingress.yaml | 2 +- kubernetes/helm/templates/webui-pvc.yaml | 2 +- kubernetes/helm/templates/webui-service.yaml | 2 +- 7 files changed, 17 insertions(+), 10 deletions(-) create mode 100644 kubernetes/helm/templates/_helpers.tpl diff --git a/kubernetes/helm/templates/_helpers.tpl b/kubernetes/helm/templates/_helpers.tpl new file mode 100644 index 00000000..16a6f947 --- /dev/null +++ b/kubernetes/helm/templates/_helpers.tpl @@ -0,0 +1,7 @@ +{{- define "open-webui.name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }} +{{- end -}} + +{{- define "ollama.name" -}} +ollama +{{- end -}} diff --git a/kubernetes/helm/templates/ollama-service.yaml b/kubernetes/helm/templates/ollama-service.yaml index a993b618..a8459b52 100644 --- a/kubernetes/helm/templates/ollama-service.yaml +++ b/kubernetes/helm/templates/ollama-service.yaml @@ -1,7 +1,7 @@ apiVersion: v1 kind: Service metadata: - name: ollama-service + name: {{ include "ollama.name" . }} spec: type: {{ .Values.ollama.service.type }} selector: diff --git a/kubernetes/helm/templates/ollama-statefulset.yaml b/kubernetes/helm/templates/ollama-statefulset.yaml index 76b1988f..dfbf5ba4 100644 --- a/kubernetes/helm/templates/ollama-statefulset.yaml +++ b/kubernetes/helm/templates/ollama-statefulset.yaml @@ -1,9 +1,9 @@ apiVersion: apps/v1 kind: StatefulSet metadata: - name: ollama + name: {{ include "ollama.name" . }} spec: - serviceName: "ollama" + serviceName: {{ include "ollama.name" . }} replicas: {{ .Values.ollama.replicaCount }} selector: matchLabels: diff --git a/kubernetes/helm/templates/webui-deployment.yaml b/kubernetes/helm/templates/webui-deployment.yaml index af42ceca..e6242129 100644 --- a/kubernetes/helm/templates/webui-deployment.yaml +++ b/kubernetes/helm/templates/webui-deployment.yaml @@ -1,7 +1,7 @@ apiVersion: apps/v1 kind: Deployment metadata: - name: open-webui-deployment + name: {{ include "open-webui.name" . }} spec: replicas: 1 selector: @@ -13,7 +13,7 @@ spec: app: open-webui spec: containers: - - name: open-webui + - name: {{ .Chart.Name }} image: {{ .Values.webui.image }} ports: - containerPort: 8080 @@ -25,7 +25,7 @@ spec: mountPath: /app/backend/data env: - name: OLLAMA_API_BASE_URL - value: "http://ollama-service.{{ .Values.namespace }}.svc.cluster.local:{{ .Values.ollama.servicePort }}/api" + value: {{ printf "http://%s.%s.svc.cluster.local:%s/api" (include "ollama.name" .) (.Release.Namespace) (.Values.ollama.servicePort) | quote }} tty: true {{- with .Values.webui.nodeSelector }} nodeSelector: @@ -34,4 +34,4 @@ spec: volumes: - name: webui-volume persistentVolumeClaim: - claimName: open-webui-pvc + claimName: {{ include "open-webui.name" . }} diff --git a/kubernetes/helm/templates/webui-ingress.yaml b/kubernetes/helm/templates/webui-ingress.yaml index 28b90dc4..18fcd6cc 100644 --- a/kubernetes/helm/templates/webui-ingress.yaml +++ b/kubernetes/helm/templates/webui-ingress.yaml @@ -2,7 +2,7 @@ apiVersion: networking.k8s.io/v1 kind: Ingress metadata: - name: open-webui-ingress + name: {{ include "open-webui.name" . }} {{- if .Values.webui.ingress.annotations }} annotations: {{ toYaml .Values.webui.ingress.annotations | trimSuffix "\n" | indent 4 }} diff --git a/kubernetes/helm/templates/webui-pvc.yaml b/kubernetes/helm/templates/webui-pvc.yaml index 0db77c67..2b8d7d1c 100644 --- a/kubernetes/helm/templates/webui-pvc.yaml +++ b/kubernetes/helm/templates/webui-pvc.yaml @@ -1,7 +1,7 @@ apiVersion: v1 kind: PersistentVolumeClaim metadata: - name: open-webui-pvc + name: {{ include "open-webui.name" . }} labels: app: open-webui spec: diff --git a/kubernetes/helm/templates/webui-service.yaml b/kubernetes/helm/templates/webui-service.yaml index 8a96bd15..7ecf796d 100644 --- a/kubernetes/helm/templates/webui-service.yaml +++ b/kubernetes/helm/templates/webui-service.yaml @@ -1,7 +1,7 @@ apiVersion: v1 kind: Service metadata: - name: open-webui-service + name: {{ include "open-webui.name" . }} spec: type: {{ .Values.webui.service.type }} # Default: NodePort # Use LoadBalancer if you're on a cloud that supports it selector: From 0b7f183a038fc84d29a5a92e62b963ac61f34973 Mon Sep 17 00:00:00 2001 From: duhow Date: Mon, 19 Feb 2024 22:23:36 +0100 Subject: [PATCH 03/27] add labels and selectors --- kubernetes/helm/templates/_helpers.tpl | 36 +++++++++++++++++++ kubernetes/helm/templates/ollama-service.yaml | 13 ++++--- .../helm/templates/ollama-statefulset.yaml | 12 ++++--- .../helm/templates/webui-deployment.yaml | 10 +++--- kubernetes/helm/templates/webui-ingress.yaml | 6 ++-- kubernetes/helm/templates/webui-pvc.yaml | 2 +- kubernetes/helm/templates/webui-service.yaml | 19 ++++++---- 7 files changed, 75 insertions(+), 23 deletions(-) diff --git a/kubernetes/helm/templates/_helpers.tpl b/kubernetes/helm/templates/_helpers.tpl index 16a6f947..0ed9ddea 100644 --- a/kubernetes/helm/templates/_helpers.tpl +++ b/kubernetes/helm/templates/_helpers.tpl @@ -5,3 +5,39 @@ {{- define "ollama.name" -}} ollama {{- end -}} + +{{- define "chart.name" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} +{{- end }} + +{{- define "base.labels" -}} +helm.sh/chart: {{ include "chart.name" . }} +{{- if .Chart.AppVersion }} +app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} +{{- end }} +app.kubernetes.io/managed-by: {{ .Release.Service }} +{{- end }} + +{{- define "base.selectorLabels" -}} +app.kubernetes.io/instance: {{ .Release.Name }} +{{- end -}} + +{{- define "open-webui.selectorLabels" -}} +{{ include "base.selectorLabels" . }} +app.kubernetes.io/component: {{ .Chart.Name }} +{{- end }} + +{{- define "open-webui.labels" -}} +{{ include "base.labels" . }} +{{ include "open-webui.selectorLabels" . }} +{{- end }} + +{{- define "ollama.selectorLabels" -}} +{{ include "base.selectorLabels" . }} +app.kubernetes.io/component: {{ include "ollama.name" . }} +{{- end }} + +{{- define "ollama.labels" -}} +{{ include "base.labels" . }} +{{ include "ollama.selectorLabels" . }} +{{- end }} diff --git a/kubernetes/helm/templates/ollama-service.yaml b/kubernetes/helm/templates/ollama-service.yaml index a8459b52..f1512c5a 100644 --- a/kubernetes/helm/templates/ollama-service.yaml +++ b/kubernetes/helm/templates/ollama-service.yaml @@ -2,11 +2,16 @@ apiVersion: v1 kind: Service metadata: name: {{ include "ollama.name" . }} + labels: + {{- include "ollama.labels" . | nindent 4 }} spec: - type: {{ .Values.ollama.service.type }} selector: - app: ollama + {{- include "ollama.selectorLabels" . | nindent 4 }} +{{- with .Values.ollama.service }} + type: {{ .type }} ports: - protocol: TCP - port: {{ .Values.ollama.servicePort }} - targetPort: {{ .Values.ollama.servicePort }} + name: http + port: {{ .port }} + targetPort: {{ .containerPort }} +{{- end }} diff --git a/kubernetes/helm/templates/ollama-statefulset.yaml b/kubernetes/helm/templates/ollama-statefulset.yaml index dfbf5ba4..cc37a231 100644 --- a/kubernetes/helm/templates/ollama-statefulset.yaml +++ b/kubernetes/helm/templates/ollama-statefulset.yaml @@ -2,19 +2,21 @@ apiVersion: apps/v1 kind: StatefulSet metadata: name: {{ include "ollama.name" . }} + labels: + {{- include "ollama.labels" . | nindent 4 }} spec: serviceName: {{ include "ollama.name" . }} replicas: {{ .Values.ollama.replicaCount }} selector: matchLabels: - app: ollama + {{- include "ollama.selectorLabels" . | nindent 6 }} template: metadata: labels: - app: ollama + {{- include "ollama.selectorLabels" . | nindent 8 }} spec: containers: - - name: ollama + - name: {{ include "ollama.name" . }} image: {{ .Values.ollama.image }} ports: - containerPort: {{ .Values.ollama.servicePort }} @@ -27,8 +29,8 @@ spec: - name: NVIDIA_DRIVER_CAPABILITIES value: compute,utility {{- end}} - {{- if .Values.ollama.resources }} - resources: {{- toYaml .Values.ollama.resources | nindent 10 }} + {{- with .Values.ollama.resources }} + resources: {{- toYaml . | nindent 10 }} {{- end }} volumeMounts: - name: ollama-volume diff --git a/kubernetes/helm/templates/webui-deployment.yaml b/kubernetes/helm/templates/webui-deployment.yaml index e6242129..4b08da78 100644 --- a/kubernetes/helm/templates/webui-deployment.yaml +++ b/kubernetes/helm/templates/webui-deployment.yaml @@ -2,23 +2,25 @@ apiVersion: apps/v1 kind: Deployment metadata: name: {{ include "open-webui.name" . }} + labels: + {{- include "open-webui.labels" . | nindent 4 }} spec: replicas: 1 selector: matchLabels: - app: open-webui + {{- include "open-webui.selectorLabels" . | nindent 6 }} template: metadata: labels: - app: open-webui + {{- include "open-webui.selectorLabels" . | nindent 8 }} spec: containers: - name: {{ .Chart.Name }} image: {{ .Values.webui.image }} ports: - containerPort: 8080 - {{- if .Values.webui.resources }} - resources: {{- toYaml .Values.webui.resources | nindent 10 }} + {{- with .Values.webui.resources }} + resources: {{- toYaml . | nindent 10 }} {{- end }} volumeMounts: - name: webui-volume diff --git a/kubernetes/helm/templates/webui-ingress.yaml b/kubernetes/helm/templates/webui-ingress.yaml index 18fcd6cc..9d943c07 100644 --- a/kubernetes/helm/templates/webui-ingress.yaml +++ b/kubernetes/helm/templates/webui-ingress.yaml @@ -3,9 +3,11 @@ apiVersion: networking.k8s.io/v1 kind: Ingress metadata: name: {{ include "open-webui.name" . }} -{{- if .Values.webui.ingress.annotations }} + labels: + {{- include "open-webui.labels" . | nindent 4 }} +{{- with .Values.webui.ingress.annotations }} annotations: -{{ toYaml .Values.webui.ingress.annotations | trimSuffix "\n" | indent 4 }} + {{- toYaml . | nindent 4 }} {{- end }} spec: rules: diff --git a/kubernetes/helm/templates/webui-pvc.yaml b/kubernetes/helm/templates/webui-pvc.yaml index 2b8d7d1c..711117fb 100644 --- a/kubernetes/helm/templates/webui-pvc.yaml +++ b/kubernetes/helm/templates/webui-pvc.yaml @@ -3,7 +3,7 @@ kind: PersistentVolumeClaim metadata: name: {{ include "open-webui.name" . }} labels: - app: open-webui + {{- include "open-webui.labels" . | nindent 4 }} spec: accessModes: [ "ReadWriteOnce" ] resources: diff --git a/kubernetes/helm/templates/webui-service.yaml b/kubernetes/helm/templates/webui-service.yaml index 7ecf796d..d126968d 100644 --- a/kubernetes/helm/templates/webui-service.yaml +++ b/kubernetes/helm/templates/webui-service.yaml @@ -2,13 +2,18 @@ apiVersion: v1 kind: Service metadata: name: {{ include "open-webui.name" . }} + labels: + {{- include "open-webui.labels" . | nindent 4 }} spec: - type: {{ .Values.webui.service.type }} # Default: NodePort # Use LoadBalancer if you're on a cloud that supports it selector: - app: open-webui + {{- include "open-webui.selectorLabels" . | nindent 4 }} +{{- with .Values.webui.service }} + type: {{ .type }} ports: - - protocol: TCP - port: {{ .Values.webui.servicePort }} - targetPort: {{ .Values.webui.servicePort }} - # If using NodePort, you can optionally specify the nodePort: - # nodePort: 30000 + - protocol: TCP + port: {{ .port }} + targetPort: {{ .containerPort }} + {{- if .nodePort }} + nodePort: {{ .nodePort }} + {{- end }} +{{- end }} From 05e31494c2ce13b9254922816d611cff4f52a9a8 Mon Sep 17 00:00:00 2001 From: duhow Date: Mon, 19 Feb 2024 22:33:22 +0100 Subject: [PATCH 04/27] rename ports, labels and service settings --- kubernetes/helm/templates/ollama-service.yaml | 4 ++-- kubernetes/helm/templates/ollama-statefulset.yaml | 5 +++-- kubernetes/helm/templates/webui-deployment.yaml | 7 ++++--- kubernetes/helm/templates/webui-ingress.yaml | 4 ++-- kubernetes/helm/templates/webui-pvc.yaml | 4 ++-- kubernetes/helm/templates/webui-service.yaml | 4 ++-- kubernetes/helm/values.yaml | 15 ++++++++++----- 7 files changed, 25 insertions(+), 18 deletions(-) diff --git a/kubernetes/helm/templates/ollama-service.yaml b/kubernetes/helm/templates/ollama-service.yaml index f1512c5a..be5a6657 100644 --- a/kubernetes/helm/templates/ollama-service.yaml +++ b/kubernetes/helm/templates/ollama-service.yaml @@ -12,6 +12,6 @@ spec: ports: - protocol: TCP name: http - port: {{ .port }} - targetPort: {{ .containerPort }} + port: http + targetPort: {{ .port }} {{- end }} diff --git a/kubernetes/helm/templates/ollama-statefulset.yaml b/kubernetes/helm/templates/ollama-statefulset.yaml index cc37a231..19204347 100644 --- a/kubernetes/helm/templates/ollama-statefulset.yaml +++ b/kubernetes/helm/templates/ollama-statefulset.yaml @@ -13,13 +13,14 @@ spec: template: metadata: labels: - {{- include "ollama.selectorLabels" . | nindent 8 }} + {{- include "ollama.labels" . | nindent 8 }} spec: containers: - name: {{ include "ollama.name" . }} image: {{ .Values.ollama.image }} ports: - - containerPort: {{ .Values.ollama.servicePort }} + - name: http + containerPort: {{ .Values.ollama.service.containerPort }} env: {{- if .Values.ollama.gpu.enabled }} - name: PATH diff --git a/kubernetes/helm/templates/webui-deployment.yaml b/kubernetes/helm/templates/webui-deployment.yaml index 4b08da78..3e62ac9f 100644 --- a/kubernetes/helm/templates/webui-deployment.yaml +++ b/kubernetes/helm/templates/webui-deployment.yaml @@ -5,20 +5,21 @@ metadata: labels: {{- include "open-webui.labels" . | nindent 4 }} spec: - replicas: 1 + replicas: {{ .Values.webui.replicaCount }} selector: matchLabels: {{- include "open-webui.selectorLabels" . | nindent 6 }} template: metadata: labels: - {{- include "open-webui.selectorLabels" . | nindent 8 }} + {{- include "open-webui.labels" . | nindent 8 }} spec: containers: - name: {{ .Chart.Name }} image: {{ .Values.webui.image }} ports: - - containerPort: 8080 + - name: http + containerPort: {{ .Values.webui.service.containerPort }} {{- with .Values.webui.resources }} resources: {{- toYaml . | nindent 10 }} {{- end }} diff --git a/kubernetes/helm/templates/webui-ingress.yaml b/kubernetes/helm/templates/webui-ingress.yaml index 9d943c07..4cb1b139 100644 --- a/kubernetes/helm/templates/webui-ingress.yaml +++ b/kubernetes/helm/templates/webui-ingress.yaml @@ -18,7 +18,7 @@ spec: pathType: Prefix backend: service: - name: open-webui-service + name: {{ include "open-webui.name" . }} port: - number: {{ .Values.webui.servicePort }} + number: {{ .Values.webui.service.port }} {{- end }} diff --git a/kubernetes/helm/templates/webui-pvc.yaml b/kubernetes/helm/templates/webui-pvc.yaml index 711117fb..3ceed2ca 100644 --- a/kubernetes/helm/templates/webui-pvc.yaml +++ b/kubernetes/helm/templates/webui-pvc.yaml @@ -3,9 +3,9 @@ kind: PersistentVolumeClaim metadata: name: {{ include "open-webui.name" . }} labels: - {{- include "open-webui.labels" . | nindent 4 }} + {{- include "open-webui.selectorLabels" . | nindent 4 }} spec: accessModes: [ "ReadWriteOnce" ] resources: requests: - storage: {{ .Values.webui.volumeSize }} + storage: {{ .Values.webui.persistence.size }} diff --git a/kubernetes/helm/templates/webui-service.yaml b/kubernetes/helm/templates/webui-service.yaml index d126968d..bd87c853 100644 --- a/kubernetes/helm/templates/webui-service.yaml +++ b/kubernetes/helm/templates/webui-service.yaml @@ -11,8 +11,8 @@ spec: type: {{ .type }} ports: - protocol: TCP - port: {{ .port }} - targetPort: {{ .containerPort }} + port: http + targetPort: {{ .port }} {{- if .nodePort }} nodePort: {{ .nodePort }} {{- end }} diff --git a/kubernetes/helm/values.yaml b/kubernetes/helm/values.yaml index ff96fa27..3e9f6a95 100644 --- a/kubernetes/helm/values.yaml +++ b/kubernetes/helm/values.yaml @@ -1,7 +1,6 @@ ollama: replicaCount: 1 image: ollama/ollama:latest - servicePort: 11434 resources: requests: cpu: "2000m" @@ -15,13 +14,14 @@ ollama: tolerations: [] service: type: ClusterIP + port: 80 + containerPort: 11434 gpu: enabled: false webui: replicaCount: 1 image: ghcr.io/open-webui/open-webui:main - servicePort: 8080 resources: requests: cpu: "500m" @@ -31,12 +31,17 @@ webui: memory: "1Gi" ingress: enabled: true - annotations: + annotations: {} # Use appropriate annotations for your Ingress controller, e.g., for NGINX: # nginx.ingress.kubernetes.io/rewrite-target: / host: open-webui.minikube.local - volumeSize: 2Gi + persistence: + enabled: true + size: 2Gi nodeSelector: {} tolerations: [] service: - type: NodePort + type: ClusterIP + port: 80 + containerPort: 8080 + nodePort: "" From 0d803aa0fda8fde7d3375f09471ccebf85701a8f Mon Sep 17 00:00:00 2001 From: duhow Date: Mon, 19 Feb 2024 22:43:03 +0100 Subject: [PATCH 05/27] update image repository and storage --- .../helm/templates/ollama-statefulset.yaml | 17 +++++++++-------- .../helm/templates/webui-deployment.yaml | 5 ++++- kubernetes/helm/values.yaml | 19 +++++++++++++++---- 3 files changed, 28 insertions(+), 13 deletions(-) diff --git a/kubernetes/helm/templates/ollama-statefulset.yaml b/kubernetes/helm/templates/ollama-statefulset.yaml index 19204347..39378716 100644 --- a/kubernetes/helm/templates/ollama-statefulset.yaml +++ b/kubernetes/helm/templates/ollama-statefulset.yaml @@ -17,7 +17,10 @@ spec: spec: containers: - name: {{ include "ollama.name" . }} - image: {{ .Values.ollama.image }} + {{- with .Values.ollama.image }} + image: {{ .repository }}:{{ .tag }} + imagePullPolicy: {{ .pullPolicy }} + {{- end }} ports: - name: http containerPort: {{ .Values.ollama.service.containerPort }} @@ -29,7 +32,7 @@ spec: value: /usr/local/nvidia/lib:/usr/local/nvidia/lib64 - name: NVIDIA_DRIVER_CAPABILITIES value: compute,utility - {{- end}} + {{- end }} {{- with .Values.ollama.resources }} resources: {{- toYaml . | nindent 10 }} {{- end }} @@ -41,12 +44,10 @@ spec: nodeSelector: {{- toYaml . | nindent 8 }} {{- end }} + {{- with .Values.ollama.tolerations }} tolerations: - {{- if .Values.ollama.gpu.enabled }} - - key: nvidia.com/gpu - operator: Exists - effect: NoSchedule - {{- end }} + {{- toYaml . | nindent 8 }} + {{- end }} volumeClaimTemplates: - metadata: name: ollama-volume @@ -54,4 +55,4 @@ spec: accessModes: [ "ReadWriteOnce" ] resources: requests: - storage: {{ .Values.ollama.volumeSize }} + storage: {{ .Values.ollama.persistence.size }} diff --git a/kubernetes/helm/templates/webui-deployment.yaml b/kubernetes/helm/templates/webui-deployment.yaml index 3e62ac9f..9250d315 100644 --- a/kubernetes/helm/templates/webui-deployment.yaml +++ b/kubernetes/helm/templates/webui-deployment.yaml @@ -16,7 +16,10 @@ spec: spec: containers: - name: {{ .Chart.Name }} - image: {{ .Values.webui.image }} + {{- with .Values.webui.image }} + image: {{ .repository }}:{{ .tag }} + imagePullPolicy: {{ .pullPolicy }} + {{- end }} ports: - name: http containerPort: {{ .Values.webui.service.containerPort }} diff --git a/kubernetes/helm/values.yaml b/kubernetes/helm/values.yaml index 3e9f6a95..dde2db17 100644 --- a/kubernetes/helm/values.yaml +++ b/kubernetes/helm/values.yaml @@ -1,6 +1,9 @@ ollama: replicaCount: 1 - image: ollama/ollama:latest + image: + repository: ollama/ollama + tag: latest + pullPolicy: Always resources: requests: cpu: "2000m" @@ -9,9 +12,14 @@ ollama: cpu: "4000m" memory: "4Gi" nvidia.com/gpu: "0" - volumeSize: 30Gi + persistence: + enabled: true + size: 30Gi nodeSelector: {} - tolerations: [] + tolerations: + - key: nvidia.com/gpu + operator: Exists + effect: NoSchedule service: type: ClusterIP port: 80 @@ -21,7 +29,10 @@ ollama: webui: replicaCount: 1 - image: ghcr.io/open-webui/open-webui:main + image: + repository: ghcr.io/open-webui/open-webui + tag: main + pullPolicy: Always resources: requests: cpu: "500m" From 75a52df8897502d03788a573868c02fdb2f7170d Mon Sep 17 00:00:00 2001 From: duhow Date: Mon, 19 Feb 2024 22:45:48 +0100 Subject: [PATCH 06/27] remove default resources allocation --- kubernetes/helm/values.yaml | 25 ++++++------------------- 1 file changed, 6 insertions(+), 19 deletions(-) diff --git a/kubernetes/helm/values.yaml b/kubernetes/helm/values.yaml index dde2db17..813fee12 100644 --- a/kubernetes/helm/values.yaml +++ b/kubernetes/helm/values.yaml @@ -4,14 +4,7 @@ ollama: repository: ollama/ollama tag: latest pullPolicy: Always - resources: - requests: - cpu: "2000m" - memory: "2Gi" - limits: - cpu: "4000m" - memory: "4Gi" - nvidia.com/gpu: "0" + resources: {} persistence: enabled: true size: 30Gi @@ -33,19 +26,13 @@ webui: repository: ghcr.io/open-webui/open-webui tag: main pullPolicy: Always - resources: - requests: - cpu: "500m" - memory: "500Mi" - limits: - cpu: "1000m" - memory: "1Gi" + resources: {} ingress: - enabled: true + enabled: disable + # -- Use appropriate annotations for your Ingress controller, e.g., for NGINX: + # nginx.ingress.kubernetes.io/rewrite-target: / annotations: {} - # Use appropriate annotations for your Ingress controller, e.g., for NGINX: - # nginx.ingress.kubernetes.io/rewrite-target: / - host: open-webui.minikube.local + host: "" persistence: enabled: true size: 2Gi From 62e00968177b2a185f2dc6c2015fdf74e0f038eb Mon Sep 17 00:00:00 2001 From: duhow Date: Mon, 19 Feb 2024 22:51:57 +0100 Subject: [PATCH 07/27] add chart details --- kubernetes/helm/Chart.yaml | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/kubernetes/helm/Chart.yaml b/kubernetes/helm/Chart.yaml index c35338c8..c05b4423 100644 --- a/kubernetes/helm/Chart.yaml +++ b/kubernetes/helm/Chart.yaml @@ -1,5 +1,21 @@ apiVersion: v2 name: open-webui -description: "Open WebUI: A User-Friendly Web Interface for Chat Interactions ๐Ÿ‘‹" version: 1.0.0 +appVersion: 1.0.0-alpha.100 + +home: https://www.openwebui.com/ icon: https://raw.githubusercontent.com/open-webui/open-webui/main/static/favicon.png + +description: "Open WebUI: A User-Friendly Web Interface for Chat Interactions ๐Ÿ‘‹" +keywords: +- llm +- chat +- web-ui + +sources: +- https://github.com/open-webui/open-webui/tree/main/kubernetes/helm +- https://hub.docker.com/r/ollama/ollama +- https://github.com/open-webui/open-webui/pkgs/container/open-webui + +annotations: + licenses: MIT From 4608afa5b9fa25491f5ee3041599654e79ab4a7b Mon Sep 17 00:00:00 2001 From: duhow Date: Mon, 19 Feb 2024 22:55:22 +0100 Subject: [PATCH 08/27] fix values and update docker tag --- kubernetes/helm/values.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kubernetes/helm/values.yaml b/kubernetes/helm/values.yaml index 813fee12..60234bb3 100644 --- a/kubernetes/helm/values.yaml +++ b/kubernetes/helm/values.yaml @@ -24,11 +24,11 @@ webui: replicaCount: 1 image: repository: ghcr.io/open-webui/open-webui - tag: main + tag: latest pullPolicy: Always resources: {} ingress: - enabled: disable + enabled: false # -- Use appropriate annotations for your Ingress controller, e.g., for NGINX: # nginx.ingress.kubernetes.io/rewrite-target: / annotations: {} From 34b7fd18c70d4a561d32639dbd702031980371d3 Mon Sep 17 00:00:00 2001 From: duhow Date: Mon, 19 Feb 2024 23:18:06 +0100 Subject: [PATCH 09/27] update storage definition --- .../helm/templates/ollama-statefulset.yaml | 35 ++++++++++++++++--- .../helm/templates/webui-deployment.yaml | 13 +++++-- kubernetes/helm/templates/webui-pvc.yaml | 16 ++++++++- kubernetes/helm/values.yaml | 14 +++++++- 4 files changed, 69 insertions(+), 9 deletions(-) diff --git a/kubernetes/helm/templates/ollama-statefulset.yaml b/kubernetes/helm/templates/ollama-statefulset.yaml index 39378716..38d4e8b4 100644 --- a/kubernetes/helm/templates/ollama-statefulset.yaml +++ b/kubernetes/helm/templates/ollama-statefulset.yaml @@ -21,6 +21,7 @@ spec: image: {{ .repository }}:{{ .tag }} imagePullPolicy: {{ .pullPolicy }} {{- end }} + tty: true ports: - name: http containerPort: {{ .Values.ollama.service.containerPort }} @@ -37,9 +38,8 @@ spec: resources: {{- toYaml . | nindent 10 }} {{- end }} volumeMounts: - - name: ollama-volume + - name: data mountPath: /root/.ollama - tty: true {{- with .Values.ollama.nodeSelector }} nodeSelector: {{- toYaml . | nindent 8 }} @@ -48,11 +48,36 @@ spec: 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: ollama-volume + name: data + labels: + {{- include "ollama.selectorLabels" . | nindent 8 }} + {{- with .Values.ollama.persistence.annotations }} + annotations: + {{- toYaml . | nindent 8 }} + {{- end }} spec: - accessModes: [ "ReadWriteOnce" ] + accessModes: + {{- range .Values.ollama.persistence.accessModes }} + - {{ . | quote }} + {{- end }} resources: requests: - storage: {{ .Values.ollama.persistence.size }} + storage: {{ .Values.ollama.persistence.size | quote }} + storageClass: {{ .Values.ollama.persistence.storageClass }} + {{- with .Values.ollama.persistence.selector }} + selector: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- end }} diff --git a/kubernetes/helm/templates/webui-deployment.yaml b/kubernetes/helm/templates/webui-deployment.yaml index 9250d315..effac745 100644 --- a/kubernetes/helm/templates/webui-deployment.yaml +++ b/kubernetes/helm/templates/webui-deployment.yaml @@ -27,7 +27,7 @@ spec: resources: {{- toYaml . | nindent 10 }} {{- end }} volumeMounts: - - name: webui-volume + - name: data mountPath: /app/backend/data env: - name: OLLAMA_API_BASE_URL @@ -38,6 +38,15 @@ spec: {{- toYaml . | nindent 8 }} {{- end }} volumes: - - name: webui-volume + {{- if and .Values.webui.persistence.enabled .Values.webui.persistence.existingClaim }} + - name: data + persistentVolumeClaim: + claimName: {{ .Values.webui.persistence.existingClaim }} + {{- else if not .Values.webui.persistence.enabled }} + - name: data + emptyDir: {} + {{- else if and .Values.webui.persistence.enabled (not .Values.webui.persistence.existingClaim) }} + - name: data persistentVolumeClaim: claimName: {{ include "open-webui.name" . }} + {{- end }} diff --git a/kubernetes/helm/templates/webui-pvc.yaml b/kubernetes/helm/templates/webui-pvc.yaml index 3ceed2ca..06b2cc4a 100644 --- a/kubernetes/helm/templates/webui-pvc.yaml +++ b/kubernetes/helm/templates/webui-pvc.yaml @@ -1,11 +1,25 @@ +{{- 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: [ "ReadWriteOnce" ] + accessModes: + {{- range .Values.webui.persistence.accessModes }} + - {{ . | quote }} + {{- end }} resources: requests: storage: {{ .Values.webui.persistence.size }} + storageClass: {{ .Values.webui.persistence.storageClass }} + {{- with .Values.webui.persistence.selector }} + selector: + {{- toYaml . | nindent 4 }} + {{- end }} +{{- end }} diff --git a/kubernetes/helm/values.yaml b/kubernetes/helm/values.yaml index 60234bb3..41d43059 100644 --- a/kubernetes/helm/values.yaml +++ b/kubernetes/helm/values.yaml @@ -8,6 +8,11 @@ ollama: persistence: enabled: true size: 30Gi + accessModes: + - ReadWriteOnce + storageClass: "" + selector: {} + annotations: {} nodeSelector: {} tolerations: - key: nvidia.com/gpu @@ -18,6 +23,7 @@ ollama: port: 80 containerPort: 11434 gpu: + # -- Enable additional ENV values to help Ollama discover GPU usage enabled: false webui: @@ -35,7 +41,13 @@ webui: host: "" persistence: enabled: true - size: 2Gi + size: 30Gi + # -- If using multiple replicas, you must update accessModes to ReadWriteMany + accessModes: + - ReadWriteOnce + storageClass: "" + selector: {} + annotations: {} nodeSelector: {} tolerations: [] service: From f82347ead68b986ffbe8cca255fd7cc89b7d58f8 Mon Sep 17 00:00:00 2001 From: duhow Date: Mon, 19 Feb 2024 23:22:10 +0100 Subject: [PATCH 10/27] add annotations --- kubernetes/helm/templates/ollama-service.yaml | 4 ++++ kubernetes/helm/templates/ollama-statefulset.yaml | 8 ++++++++ kubernetes/helm/templates/webui-deployment.yaml | 8 ++++++++ kubernetes/helm/templates/webui-ingress.yaml | 4 ++-- kubernetes/helm/values.yaml | 6 ++++++ 5 files changed, 28 insertions(+), 2 deletions(-) diff --git a/kubernetes/helm/templates/ollama-service.yaml b/kubernetes/helm/templates/ollama-service.yaml index be5a6657..75d06e69 100644 --- a/kubernetes/helm/templates/ollama-service.yaml +++ b/kubernetes/helm/templates/ollama-service.yaml @@ -4,6 +4,10 @@ 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 }} diff --git a/kubernetes/helm/templates/ollama-statefulset.yaml b/kubernetes/helm/templates/ollama-statefulset.yaml index 38d4e8b4..da88de82 100644 --- a/kubernetes/helm/templates/ollama-statefulset.yaml +++ b/kubernetes/helm/templates/ollama-statefulset.yaml @@ -4,6 +4,10 @@ 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 }} @@ -14,6 +18,10 @@ spec: metadata: labels: {{- include "ollama.labels" . | nindent 8 }} + {{- with .Values.ollama.podAnnotations }} + annotations: + {{- toYaml . | nindent 8 }} + {{- end }} spec: containers: - name: {{ include "ollama.name" . }} diff --git a/kubernetes/helm/templates/webui-deployment.yaml b/kubernetes/helm/templates/webui-deployment.yaml index effac745..766cd188 100644 --- a/kubernetes/helm/templates/webui-deployment.yaml +++ b/kubernetes/helm/templates/webui-deployment.yaml @@ -4,6 +4,10 @@ metadata: name: {{ include "open-webui.name" . }} labels: {{- include "open-webui.labels" . | nindent 4 }} + {{- with .Values.webui.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} spec: replicas: {{ .Values.webui.replicaCount }} selector: @@ -13,6 +17,10 @@ spec: metadata: labels: {{- include "open-webui.labels" . | nindent 8 }} + {{- with .Values.webui.podAnnotations }} + annotations: + {{- toYaml . | nindent 8 }} + {{- end }} spec: containers: - name: {{ .Chart.Name }} diff --git a/kubernetes/helm/templates/webui-ingress.yaml b/kubernetes/helm/templates/webui-ingress.yaml index 4cb1b139..2c6b045f 100644 --- a/kubernetes/helm/templates/webui-ingress.yaml +++ b/kubernetes/helm/templates/webui-ingress.yaml @@ -5,10 +5,10 @@ metadata: name: {{ include "open-webui.name" . }} labels: {{- include "open-webui.labels" . | nindent 4 }} -{{- with .Values.webui.ingress.annotations }} + {{- with .Values.webui.ingress.annotations }} annotations: {{- toYaml . | nindent 4 }} -{{- end }} + {{- end }} spec: rules: - host: {{ .Values.webui.ingress.host }} diff --git a/kubernetes/helm/values.yaml b/kubernetes/helm/values.yaml index 41d43059..d7db1d66 100644 --- a/kubernetes/helm/values.yaml +++ b/kubernetes/helm/values.yaml @@ -1,4 +1,6 @@ ollama: + annotations: {} + podAnnotations: {} replicaCount: 1 image: repository: ollama/ollama @@ -20,6 +22,7 @@ ollama: effect: NoSchedule service: type: ClusterIP + annotations: {} port: 80 containerPort: 11434 gpu: @@ -27,6 +30,8 @@ ollama: enabled: false webui: + annotations: {} + podAnnotations: {} replicaCount: 1 image: repository: ghcr.io/open-webui/open-webui @@ -52,6 +57,7 @@ webui: tolerations: [] service: type: ClusterIP + annotations: {} port: 80 containerPort: 8080 nodePort: "" From 18463d935e734383cf928b0215674cc896723f20 Mon Sep 17 00:00:00 2001 From: duhow Date: Mon, 19 Feb 2024 23:32:50 +0100 Subject: [PATCH 11/27] pod optimization and advanced settings --- kubernetes/helm/templates/_helpers.tpl | 4 ++++ kubernetes/helm/templates/ollama-statefulset.yaml | 5 +++++ kubernetes/helm/templates/webui-deployment.yaml | 4 +++- kubernetes/helm/templates/webui-ingress.yaml | 2 +- kubernetes/helm/values.yaml | 4 ++++ 5 files changed, 17 insertions(+), 2 deletions(-) diff --git a/kubernetes/helm/templates/_helpers.tpl b/kubernetes/helm/templates/_helpers.tpl index 0ed9ddea..0647a42a 100644 --- a/kubernetes/helm/templates/_helpers.tpl +++ b/kubernetes/helm/templates/_helpers.tpl @@ -6,6 +6,10 @@ ollama {{- end -}} +{{- define "ollama.url" -}} +{{- printf "http://%s.%s.svc.cluster.local:%d/api" (include "ollama.name" .) (.Release.Namespace) (.Values.ollama.service.port | int) }} +{{- end }} + {{- define "chart.name" -}} {{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} {{- end }} diff --git a/kubernetes/helm/templates/ollama-statefulset.yaml b/kubernetes/helm/templates/ollama-statefulset.yaml index da88de82..db7ffe45 100644 --- a/kubernetes/helm/templates/ollama-statefulset.yaml +++ b/kubernetes/helm/templates/ollama-statefulset.yaml @@ -23,6 +23,11 @@ spec: {{- toYaml . | nindent 8 }} {{- end }} spec: + enableServiceLinks: false + automountServiceAccountToken: false + {{- with .Values.ollama.runtimeClassName }} + runtimeClassName: {{ . }} + {{- end }} containers: - name: {{ include "ollama.name" . }} {{- with .Values.ollama.image }} diff --git a/kubernetes/helm/templates/webui-deployment.yaml b/kubernetes/helm/templates/webui-deployment.yaml index 766cd188..4b6605e1 100644 --- a/kubernetes/helm/templates/webui-deployment.yaml +++ b/kubernetes/helm/templates/webui-deployment.yaml @@ -22,6 +22,8 @@ spec: {{- toYaml . | nindent 8 }} {{- end }} spec: + enableServiceLinks: false + automountServiceAccountToken: false containers: - name: {{ .Chart.Name }} {{- with .Values.webui.image }} @@ -39,7 +41,7 @@ spec: mountPath: /app/backend/data env: - name: OLLAMA_API_BASE_URL - value: {{ printf "http://%s.%s.svc.cluster.local:%s/api" (include "ollama.name" .) (.Release.Namespace) (.Values.ollama.servicePort) | quote }} + value: {{ include "ollama.url" . | quote }} tty: true {{- with .Values.webui.nodeSelector }} nodeSelector: diff --git a/kubernetes/helm/templates/webui-ingress.yaml b/kubernetes/helm/templates/webui-ingress.yaml index 2c6b045f..4513b39d 100644 --- a/kubernetes/helm/templates/webui-ingress.yaml +++ b/kubernetes/helm/templates/webui-ingress.yaml @@ -20,5 +20,5 @@ spec: service: name: {{ include "open-webui.name" . }} port: - number: {{ .Values.webui.service.port }} + name: http {{- end }} diff --git a/kubernetes/helm/values.yaml b/kubernetes/helm/values.yaml index d7db1d66..fa8cca52 100644 --- a/kubernetes/helm/values.yaml +++ b/kubernetes/helm/values.yaml @@ -1,3 +1,5 @@ +nameOverride: "" + ollama: annotations: {} podAnnotations: {} @@ -16,6 +18,8 @@ ollama: selector: {} annotations: {} nodeSelector: {} + # -- If using a special runtime container such as nvidia, set it here. + runtimeClassName: "" tolerations: - key: nvidia.com/gpu operator: Exists From 2f0ed3becbc34b6526665954b4927100b2d688b0 Mon Sep 17 00:00:00 2001 From: duhow Date: Mon, 19 Feb 2024 23:37:05 +0100 Subject: [PATCH 12/27] add ingress tls and settings --- kubernetes/helm/templates/webui-ingress.yaml | 9 +++++++++ kubernetes/helm/values.yaml | 3 +++ 2 files changed, 12 insertions(+) diff --git a/kubernetes/helm/templates/webui-ingress.yaml b/kubernetes/helm/templates/webui-ingress.yaml index 4513b39d..ea9f95e1 100644 --- a/kubernetes/helm/templates/webui-ingress.yaml +++ b/kubernetes/helm/templates/webui-ingress.yaml @@ -10,6 +10,15 @@ metadata: {{- toYaml . | nindent 4 }} {{- end }} spec: + {{- with .Values.webui.ingress.class }} + ingressClassName: {{ . }} + {{- end }} + {{- if .Values.webui.ingress.tls }} + tls: + - hosts: + - {{ .Values.webui.ingress.host | quote }} + secretName: {{ default (printf "%s-tls" .Release.Name) .Values.webui.ingress.existingSecret }} + {{- end }} rules: - host: {{ .Values.webui.ingress.host }} http: diff --git a/kubernetes/helm/values.yaml b/kubernetes/helm/values.yaml index fa8cca52..bdc1d902 100644 --- a/kubernetes/helm/values.yaml +++ b/kubernetes/helm/values.yaml @@ -44,10 +44,13 @@ webui: 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: 30Gi From a91a22567d03ff66c7867c6c9ca87390e455509b Mon Sep 17 00:00:00 2001 From: duhow Date: Mon, 19 Feb 2024 23:39:09 +0100 Subject: [PATCH 13/27] add values-minikube --- kubernetes/helm/.helmignore | 1 + kubernetes/helm/values-minikube.yaml | 27 +++++++++++++++++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 kubernetes/helm/values-minikube.yaml diff --git a/kubernetes/helm/.helmignore b/kubernetes/helm/.helmignore index e69de29b..e8065247 100644 --- a/kubernetes/helm/.helmignore +++ b/kubernetes/helm/.helmignore @@ -0,0 +1 @@ +values-minikube.yaml diff --git a/kubernetes/helm/values-minikube.yaml b/kubernetes/helm/values-minikube.yaml new file mode 100644 index 00000000..1b67b0b7 --- /dev/null +++ b/kubernetes/helm/values-minikube.yaml @@ -0,0 +1,27 @@ +ollama: + resources: + requests: + cpu: "2000m" + memory: "2Gi" + limits: + cpu: "4000m" + memory: "4Gi" + nvidia.com/gpu: "0" + service: + type: ClusterIP + 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 From f5ac3a1ebf4678cca42c559bd1628aae3bbcca0e Mon Sep 17 00:00:00 2001 From: duhow Date: Tue, 20 Feb 2024 00:06:53 +0100 Subject: [PATCH 14/27] update webui size --- kubernetes/helm/values.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kubernetes/helm/values.yaml b/kubernetes/helm/values.yaml index bdc1d902..0245f4a6 100644 --- a/kubernetes/helm/values.yaml +++ b/kubernetes/helm/values.yaml @@ -53,7 +53,7 @@ webui: existingSecret: "" persistence: enabled: true - size: 30Gi + size: 2Gi # -- If using multiple replicas, you must update accessModes to ReadWriteMany accessModes: - ReadWriteOnce From 214881451dd9d228353e51a01244880f6466e6a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Gir=C3=B3n?= Date: Fri, 23 Feb 2024 11:03:06 +0100 Subject: [PATCH 15/27] allow custom default user role --- backend/config.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/config.py b/backend/config.py index 784c95d1..d7c9414f 100644 --- a/backend/config.py +++ b/backend/config.py @@ -187,7 +187,7 @@ DEFAULT_PROMPT_SUGGESTIONS = ( ) -DEFAULT_USER_ROLE = "pending" +DEFAULT_USER_ROLE = os.getenv("DEFAULT_USER_ROLE", "pending") USER_PERMISSIONS = {"chat": {"deletion": True}} From 7d947c2988bc18696d670ebc8ae264d35adc1bf2 Mon Sep 17 00:00:00 2001 From: duhow Date: Fri, 23 Feb 2024 11:09:25 +0100 Subject: [PATCH 16/27] fix types --- kubernetes/helm/templates/ollama-service.yaml | 4 ++-- kubernetes/helm/templates/ollama-statefulset.yaml | 2 +- kubernetes/helm/templates/webui-service.yaml | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/kubernetes/helm/templates/ollama-service.yaml b/kubernetes/helm/templates/ollama-service.yaml index 75d06e69..becb6ad2 100644 --- a/kubernetes/helm/templates/ollama-service.yaml +++ b/kubernetes/helm/templates/ollama-service.yaml @@ -16,6 +16,6 @@ spec: ports: - protocol: TCP name: http - port: http - targetPort: {{ .port }} + port: {{ .port }} + targetPort: http {{- end }} diff --git a/kubernetes/helm/templates/ollama-statefulset.yaml b/kubernetes/helm/templates/ollama-statefulset.yaml index db7ffe45..a87aeab0 100644 --- a/kubernetes/helm/templates/ollama-statefulset.yaml +++ b/kubernetes/helm/templates/ollama-statefulset.yaml @@ -70,7 +70,7 @@ spec: - name: data emptyDir: {} {{- else if and .Values.ollama.persistence.enabled (not .Values.ollama.persistence.existingClaim) }} - {} + [] volumeClaimTemplates: - metadata: name: data diff --git a/kubernetes/helm/templates/webui-service.yaml b/kubernetes/helm/templates/webui-service.yaml index bd87c853..bfae9294 100644 --- a/kubernetes/helm/templates/webui-service.yaml +++ b/kubernetes/helm/templates/webui-service.yaml @@ -11,9 +11,9 @@ spec: type: {{ .type }} ports: - protocol: TCP - port: http - targetPort: {{ .port }} + port: {{ .port }} + targetPort: http {{- if .nodePort }} - nodePort: {{ .nodePort }} + nodePort: {{ .nodePort | int }} {{- end }} {{- end }} From dd64b1e693787e1fd0b7db2024cdaa0845444279 Mon Sep 17 00:00:00 2001 From: duhow Date: Fri, 23 Feb 2024 11:24:19 +0100 Subject: [PATCH 17/27] use "latest" as appVersion --- kubernetes/helm/Chart.yaml | 2 +- kubernetes/helm/templates/webui-deployment.yaml | 2 +- kubernetes/helm/values.yaml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/kubernetes/helm/Chart.yaml b/kubernetes/helm/Chart.yaml index c05b4423..ab5b41df 100644 --- a/kubernetes/helm/Chart.yaml +++ b/kubernetes/helm/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v2 name: open-webui version: 1.0.0 -appVersion: 1.0.0-alpha.100 +appVersion: "latest" home: https://www.openwebui.com/ icon: https://raw.githubusercontent.com/open-webui/open-webui/main/static/favicon.png diff --git a/kubernetes/helm/templates/webui-deployment.yaml b/kubernetes/helm/templates/webui-deployment.yaml index 4b6605e1..df13a14b 100644 --- a/kubernetes/helm/templates/webui-deployment.yaml +++ b/kubernetes/helm/templates/webui-deployment.yaml @@ -27,7 +27,7 @@ spec: containers: - name: {{ .Chart.Name }} {{- with .Values.webui.image }} - image: {{ .repository }}:{{ .tag }} + image: {{ .repository }}:{{ .tag | default $.Chart.AppVersion }} imagePullPolicy: {{ .pullPolicy }} {{- end }} ports: diff --git a/kubernetes/helm/values.yaml b/kubernetes/helm/values.yaml index 0245f4a6..02e87e80 100644 --- a/kubernetes/helm/values.yaml +++ b/kubernetes/helm/values.yaml @@ -39,7 +39,7 @@ webui: replicaCount: 1 image: repository: ghcr.io/open-webui/open-webui - tag: latest + tag: "" pullPolicy: Always resources: {} ingress: From 4500d2fe13e98f6edbb7248390fce1342d8a9202 Mon Sep 17 00:00:00 2001 From: Jannik S <69747628+jannikstdl@users.noreply.github.com> Date: Fri, 23 Feb 2024 11:45:28 +0100 Subject: [PATCH 18/27] development clarification README.md --- README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/README.md b/README.md index c5cc439b..c8896725 100644 --- a/README.md +++ b/README.md @@ -286,6 +286,8 @@ cp -RPp .env.example .env # Building Frontend Using Node npm i npm run build +# or for development (hot reload) +# npm run dev # or Building Frontend Using Bun # bun install @@ -295,6 +297,9 @@ npm run build cd ./backend pip install -r requirements.txt -U sh start.sh +# or for development (hot reload) +# npm run build must have been run once before! +# sh dev.sh ``` You should have Open WebUI up and running at http://localhost:8080/. Enjoy! ๐Ÿ˜„ From b473ad574fee48fd56a903e58614a4c7865ec7c4 Mon Sep 17 00:00:00 2001 From: Ased Mammad Date: Fri, 23 Feb 2024 14:27:31 +0330 Subject: [PATCH 19/27] fix: RAG scan unsupported mimetype This fixes an issue with RAG that stops loading documents as soon as it reaches a file with unsupported mimetype. --- backend/apps/rag/main.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/backend/apps/rag/main.py b/backend/apps/rag/main.py index 4176d567..83c10233 100644 --- a/backend/apps/rag/main.py +++ b/backend/apps/rag/main.py @@ -423,7 +423,7 @@ def get_loader(filename: str, file_content_type: str, file_path: str): "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", ] or file_ext in ["xls", "xlsx"]: loader = UnstructuredExcelLoader(file_path) - elif file_ext in known_source_ext or file_content_type.find("text/") >= 0: + elif file_ext in known_source_ext or (file_content_type and file_content_type.find("text/") >= 0): loader = TextLoader(file_path) else: loader = TextLoader(file_path) @@ -486,8 +486,8 @@ def store_doc( @app.get("/scan") def scan_docs_dir(user=Depends(get_admin_user)): - try: - for path in Path(DOCS_DIR).rglob("./**/*"): + for path in Path(DOCS_DIR).rglob("./**/*"): + try: if path.is_file() and not path.name.startswith("."): tags = extract_folders_after_data_docs(path) filename = path.name @@ -535,8 +535,8 @@ def scan_docs_dir(user=Depends(get_admin_user)): ), ) - except Exception as e: - print(e) + except Exception as e: + print(e) return True From 9ee64d88c61b6b1e1047eb5911f5ff4c1823165a Mon Sep 17 00:00:00 2001 From: duhow Date: Fri, 23 Feb 2024 17:41:17 +0100 Subject: [PATCH 20/27] add missing existingClaim name --- kubernetes/helm/values.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/kubernetes/helm/values.yaml b/kubernetes/helm/values.yaml index 02e87e80..3104dc84 100644 --- a/kubernetes/helm/values.yaml +++ b/kubernetes/helm/values.yaml @@ -12,6 +12,7 @@ ollama: persistence: enabled: true size: 30Gi + existingClaim: "" accessModes: - ReadWriteOnce storageClass: "" @@ -54,6 +55,7 @@ webui: persistence: enabled: true size: 2Gi + existingClaim: "" # -- If using multiple replicas, you must update accessModes to ReadWriteMany accessModes: - ReadWriteOnce From 035c2e05000dbb5b27f29d3f5670b4cdc4d1053f Mon Sep 17 00:00:00 2001 From: Gene Kuo Date: Sat, 24 Feb 2024 03:14:17 +0900 Subject: [PATCH 21/27] Fix Kubernetes Manifest for Web UI There are currently 2 issues with the Kubernetes manifest: - open-webui-deployment refers to ollama-webui-pvc but not included in kustomization.yaml, causing issue if using GPU deployment - ollama-webui-pvc is using the wrong namespace This commit fixes both issue. --- kubernetes/manifest/base/webui-pvc.yaml | 2 +- kubernetes/manifest/kustomization.yaml | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/kubernetes/manifest/base/webui-pvc.yaml b/kubernetes/manifest/base/webui-pvc.yaml index 285dfeef..5c75283a 100644 --- a/kubernetes/manifest/base/webui-pvc.yaml +++ b/kubernetes/manifest/base/webui-pvc.yaml @@ -4,7 +4,7 @@ metadata: labels: app: ollama-webui name: ollama-webui-pvc - namespace: ollama-namespace + namespace: open-webui spec: accessModes: ["ReadWriteOnce"] resources: diff --git a/kubernetes/manifest/kustomization.yaml b/kubernetes/manifest/kustomization.yaml index f581839e..907bff3e 100644 --- a/kubernetes/manifest/kustomization.yaml +++ b/kubernetes/manifest/kustomization.yaml @@ -5,6 +5,7 @@ resources: - base/webui-deployment.yaml - base/webui-service.yaml - base/webui-ingress.yaml +- base/webui-pvc.yaml apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization From 8eb6a68fcffbf58cf277ab532fd80e0b7a8c41e8 Mon Sep 17 00:00:00 2001 From: duhow Date: Fri, 23 Feb 2024 23:58:10 +0100 Subject: [PATCH 22/27] fix webui-service --- kubernetes/helm/templates/webui-service.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/kubernetes/helm/templates/webui-service.yaml b/kubernetes/helm/templates/webui-service.yaml index bfae9294..58da030d 100644 --- a/kubernetes/helm/templates/webui-service.yaml +++ b/kubernetes/helm/templates/webui-service.yaml @@ -4,6 +4,10 @@ metadata: name: {{ include "open-webui.name" . }} labels: {{- include "open-webui.labels" . | nindent 4 }} + {{- with .Values.webui.service.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} spec: selector: {{- include "open-webui.selectorLabels" . | nindent 4 }} @@ -11,6 +15,7 @@ spec: type: {{ .type }} ports: - protocol: TCP + name: http port: {{ .port }} targetPort: http {{- if .nodePort }} From 62f67bed292ae27fec9e63e1ead1c80355319d4b Mon Sep 17 00:00:00 2001 From: "Timothy J. Baek" Date: Fri, 23 Feb 2024 17:12:19 -0800 Subject: [PATCH 23/27] feat: sponsor custom name support --- backend/config.py | 39 ++++++++++++++++-- backend/main.py | 6 ++- backend/static/favicon.png | Bin 0 -> 6161 bytes src/lib/components/ChangelogModal.svelte | 8 ++-- .../chat/Messages/Placeholder.svelte | 7 +++- .../chat/Messages/ResponseMessage.svelte | 4 +- src/lib/components/chat/Settings/About.svelte | 8 ++-- .../components/chat/Settings/Models.svelte | 8 ++-- src/lib/components/layout/Navbar.svelte | 7 ++-- src/lib/components/layout/Sidebar.svelte | 7 +++- src/lib/constants.ts | 4 +- src/lib/stores/index.ts | 2 + src/routes/(app)/+page.svelte | 9 ++-- src/routes/(app)/c/[id]/+page.svelte | 5 ++- src/routes/+layout.svelte | 9 ++-- src/routes/auth/+page.svelte | 10 ++--- src/routes/error/+page.svelte | 5 +-- 17 files changed, 94 insertions(+), 44 deletions(-) create mode 100644 backend/static/favicon.png diff --git a/backend/config.py b/backend/config.py index d7c9414f..f630fa94 100644 --- a/backend/config.py +++ b/backend/config.py @@ -1,13 +1,17 @@ import os import chromadb from chromadb import Settings -from secrets import token_bytes from base64 import b64encode -from constants import ERROR_MESSAGES +from bs4 import BeautifulSoup + from pathlib import Path import json import markdown -from bs4 import BeautifulSoup +import requests +import shutil + +from secrets import token_bytes +from constants import ERROR_MESSAGES try: @@ -17,6 +21,8 @@ try: except ImportError: print("dotenv not installed, skipping...") +WEBUI_NAME = "Open WebUI" + #################################### # ENV (dev,test,prod) @@ -24,7 +30,6 @@ except ImportError: ENV = os.environ.get("ENV", "dev") - try: with open(f"../package.json", "r") as f: PACKAGE_DATA = json.load(f) @@ -94,6 +99,32 @@ for version in soup.find_all("h2"): CHANGELOG = changelog_json + +#################################### +# CUSTOM_NAME +#################################### + +CUSTOM_NAME = os.environ.get("CUSTOM_NAME", "") +if CUSTOM_NAME: + r = requests.get(f"https://api.openwebui.com/api/v1/custom/{CUSTOM_NAME}") + data = r.json() + + if "logo" in data: + url = ( + f"https://api.openwebui.com{data['logo']}" + if data["logo"][0] == "/" + else data["logo"] + ) + + r = requests.get(url, stream=True) + if r.status_code == 200: + with open("./static/favicon.png", "wb") as f: + r.raw.decode_content = True + shutil.copyfileobj(r.raw, f) + + WEBUI_NAME = data["name"] + + #################################### # DATA/FRONTEND BUILD DIR #################################### diff --git a/backend/main.py b/backend/main.py index 8a9b9dce..0be56752 100644 --- a/backend/main.py +++ b/backend/main.py @@ -20,7 +20,7 @@ from apps.rag.main import app as rag_app from apps.web.main import app as webui_app -from config import ENV, VERSION, CHANGELOG, FRONTEND_BUILD_DIR +from config import WEBUI_NAME, ENV, VERSION, CHANGELOG, FRONTEND_BUILD_DIR class SPAStaticFiles(StaticFiles): @@ -72,6 +72,7 @@ async def get_app_config(): return { "status": True, + "name": WEBUI_NAME, "version": VERSION, "images": images_app.state.ENABLED, "default_models": webui_app.state.DEFAULT_MODELS, @@ -84,6 +85,9 @@ async def get_app_changelog(): return CHANGELOG +app.mount("/static", StaticFiles(directory="static"), name="static") + + app.mount( "/", SPAStaticFiles(directory=FRONTEND_BUILD_DIR, html=True), diff --git a/backend/static/favicon.png b/backend/static/favicon.png new file mode 100644 index 0000000000000000000000000000000000000000..519af1db620dbf4de3694660dae7abd7392f0b3c GIT binary patch literal 6161 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 literal 0 HcmV?d00001 diff --git a/src/lib/components/ChangelogModal.svelte b/src/lib/components/ChangelogModal.svelte index 00c12a39..0cf1f006 100644 --- a/src/lib/components/ChangelogModal.svelte +++ b/src/lib/components/ChangelogModal.svelte @@ -2,9 +2,9 @@ import { onMount } from 'svelte'; import { Confetti } from 'svelte-confetti'; - import { config } from '$lib/stores'; + import { WEBUI_NAME, config } from '$lib/stores'; - import { WEBUI_NAME, WEB_UI_VERSION } from '$lib/constants'; + import { WEBUI_VERSION } from '$lib/constants'; import { getChangelog } from '$lib/apis'; import Modal from './common/Modal.svelte'; @@ -23,7 +23,7 @@
- Whatโ€™s New in {WEBUI_NAME} + Whatโ€™s New in {$WEBUI_NAME}
- v{WEB_UI_VERSION} + v{WEBUI_VERSION}
diff --git a/src/lib/components/chat/Messages/Placeholder.svelte b/src/lib/components/chat/Messages/Placeholder.svelte index ae9ced14..f1f3e80a 100644 --- a/src/lib/components/chat/Messages/Placeholder.svelte +++ b/src/lib/components/chat/Messages/Placeholder.svelte @@ -1,4 +1,5 @@ - {WEBUI_NAME} + {$WEBUI_NAME} + diff --git a/src/routes/auth/+page.svelte b/src/routes/auth/+page.svelte index 05891d4f..30c5a93e 100644 --- a/src/routes/auth/+page.svelte +++ b/src/routes/auth/+page.svelte @@ -1,8 +1,8 @@