Files
argocd-apps/apps/base/open-webui/httproute.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

54 lines
1.1 KiB
YAML

---
apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata:
name: open-webui-http-redirect
namespace: open-webui
spec:
hostnames:
- chat.k8s.syd1.au.unkin.net
parentRefs:
- group: gateway.networking.k8s.io
kind: Gateway
name: open-webui
sectionName: http
rules:
- filters:
- type: RequestRedirect
requestRedirect:
scheme: https
statusCode: 301
matches:
- path:
type: PathPrefix
value: /
---
apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata:
name: open-webui
namespace: open-webui
spec:
hostnames:
- chat.k8s.syd1.au.unkin.net
parentRefs:
- group: gateway.networking.k8s.io
kind: Gateway
name: open-webui
sectionName: https
rules:
- backendRefs:
- group: ""
kind: Service
name: open-webui
port: 8080
weight: 1
matches:
- path:
type: PathPrefix
value: /
sessionPersistence:
type: Cookie
cookieName: open-webui-backend
absoluteTimeout: 24h0m0s