Skip to content

Commit ac5eb84

Browse files
authored
Merge pull request #325 from lewisco/main
feat(open-webui): add workload.kind configuration option
2 parents 7820447 + 5b0555f commit ac5eb84

File tree

4 files changed

+21
-10
lines changed

4 files changed

+21
-10
lines changed

charts/open-webui/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
apiVersion: v2
22
name: open-webui
3-
version: 8.19.0
3+
version: 8.20.0
44
appVersion: 0.6.41
55
home: https://www.openwebui.com/
66
icon: >-

charts/open-webui/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# open-webui
22

3-
![Version: 8.19.0](https://img.shields.io/badge/Version-8.19.0-informational?style=flat-square) ![AppVersion: 0.6.41](https://img.shields.io/badge/AppVersion-0.6.41-informational?style=flat-square)
3+
![Version: 8.20.0](https://img.shields.io/badge/Version-8.20.0-informational?style=flat-square) ![AppVersion: 0.6.41](https://img.shields.io/badge/AppVersion-0.6.41-informational?style=flat-square)
44

55
Open WebUI: A User-Friendly Web Interface for Chat Interactions 👋
66

@@ -321,6 +321,7 @@ helm upgrade --install open-webui open-webui/open-webui
321321
| topologySpreadConstraints | list | `[]` | Topology Spread Constraints for pod assignment |
322322
| volumeMounts | object | `{"container":[],"initContainer":[]}` | Configure container volume mounts ref: <https://kubernetes.io/docs/tasks/configure-pod-container/configure-volume-storage/> |
323323
| volumes | list | `[]` | Configure pod volumes ref: <https://kubernetes.io/docs/tasks/configure-pod-container/configure-volume-storage/> |
324+
| workload.kind | string | `""` | Workload kind to use. Options are "Deployment", "StatefulSet". If not set, the chart will determine the kind based on persistence settings. NOTE: When using Deployment with local persistence and replicaCount > 1, ensure persistence.accessModes includes ReadWriteMany (RWX). |
324325

325326
----------------------------------------------
326327

charts/open-webui/templates/workload-manager.yaml

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
1+
{{- /* Validate workload.kind if set */ -}}
2+
{{- if and .Values.workload.kind (not (or (eq .Values.workload.kind "Deployment") (eq .Values.workload.kind "StatefulSet"))) -}}
3+
{{- fail "workload.kind must be \"Deployment\" or \"StatefulSet\" (or empty)" -}}
4+
{{- end -}}
5+
{{- /* Determine the actual workload kind */ -}}
6+
{{- $kind := .Values.workload.kind | default (ternary "StatefulSet" "Deployment" (and .Values.persistence.enabled (eq .Values.persistence.provider "local"))) -}}
17
apiVersion: apps/v1
2-
{{- if and .Values.persistence.enabled (eq .Values.persistence.provider "local") }}
3-
kind: StatefulSet
4-
{{- else }}
5-
kind: Deployment
6-
{{- end }}
8+
kind: {{ $kind }}
79
metadata:
810
name: {{ include "open-webui.name" . }}
911
namespace: {{ include "open-webui.namespace" . }}
@@ -16,17 +18,17 @@ metadata:
1618
{{- end }}
1719
spec:
1820
replicas: {{ .Values.replicaCount }}
19-
{{- if or (not .Values.persistence.enabled) (not (eq .Values.persistence.provider "local")) }}
21+
{{- if eq $kind "Deployment" }}
2022
revisionHistoryLimit: {{ .Values.revisionHistoryLimit }}
2123
{{- end }}
22-
{{- if and .Values.persistence.enabled (eq .Values.persistence.provider "local") }}
24+
{{- if eq $kind "StatefulSet" }}
2325
serviceName: {{ include "open-webui.name" . }}
2426
{{- end }}
2527
selector:
2628
matchLabels:
2729
{{- include "open-webui.selectorLabels" . | nindent 6 }}
2830
{{- if .Values.strategy }}
29-
{{- if and .Values.persistence.enabled (eq .Values.persistence.provider "local") }}
31+
{{- if eq $kind "StatefulSet" }}
3032
updateStrategy:
3133
{{- toYaml .Values.strategy | nindent 4 }}
3234
{{- else }}

charts/open-webui/values.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,14 @@ websocket:
139139
# runAsUser: 999
140140
# runAsGroup: 1000
141141

142+
143+
workload:
144+
# -- Workload kind to use. Options are "Deployment", "StatefulSet".
145+
# If not set, the chart will determine the kind based on persistence settings.
146+
# NOTE: When using Deployment with local persistence and replicaCount > 1,
147+
# ensure persistence.accessModes includes ReadWriteMany (RWX).
148+
kind: ""
149+
142150
# -- Value of cluster domain
143151
clusterDomain: cluster.local
144152

0 commit comments

Comments
 (0)