Files
argocd-apps/apps/base/open-webui/deployment.yaml
T
unkinben 3d85105afd
ci/woodpecker/pr/pre-commit Pipeline was successful
ci/woodpecker/pr/kubeconform Pipeline failed
feat(open-webui): HA deployment with CNPG, PDB, and session persistence
- Switch from SQLite/PVC to CNPG PostgreSQL (3 instances, low-resource)
  with a transaction-mode PgBouncer pooler (2 instances)
- Raise open-webui replicas to 3 with priorityClassName: power
- Add PodDisruptionBudget (minAvailable: 1)
- Add Gateway API sessionPersistence (cookie) on the HTTPS HTTPRoute
  so WebSocket connections stick to the same backend pod
- Add postgres-credentials VaultStaticSecret; DATABASE_URL must be
  added to kv/kubernetes/namespace/open-webui/default/open-webui-credentials
2026-05-26 23:37:10 +10:00

62 lines
1.5 KiB
YAML

---
apiVersion: apps/v1
kind: Deployment
metadata:
name: open-webui
namespace: open-webui
spec:
replicas: 3
selector:
matchLabels:
app: open-webui
template:
metadata:
annotations:
reloader.stakater.com/auto: "true"
labels:
app: open-webui
spec:
priorityClassName: power
containers:
- name: open-webui
image: ghcr.io/open-webui/open-webui:main
imagePullPolicy: Always
ports:
- containerPort: 8080
name: http
protocol: TCP
env:
- name: OPENAI_API_BASE_URL
value: https://litellm.k8s.syd1.au.unkin.net
- name: WEBUI_URL
value: https://chat.k8s.syd1.au.unkin.net
envFrom:
- secretRef:
name: open-webui-credentials
livenessProbe:
httpGet:
path: /health
port: 8080
failureThreshold: 3
initialDelaySeconds: 30
periodSeconds: 30
successThreshold: 1
timeoutSeconds: 5
readinessProbe:
httpGet:
path: /health
port: 8080
failureThreshold: 3
initialDelaySeconds: 10
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 5
resources:
limits:
cpu: "2"
memory: 4Gi
requests:
cpu: 250m
memory: 512Mi
restartPolicy: Always