apiVersion: apps/v1 kind: StatefulSet metadata: name: openwebui namespace: openwebui spec: replicas: 1 selector: matchLabels: app: openwebui serviceName: openwebui template: metadata: labels: app: openwebui spec: restartPolicy: Always terminationGracePeriodSeconds: 30 containers: - name: openwebui image: ghcr.io/open-webui/open-webui:main resources: requests: cpu: 200m memory: 512Mi limits: cpu: 1000m memory: 2Gi ports: - containerPort: 8080 env: - name: OLLAMA_BASE_URL value: "http://ollama.ollama.svc.cluster.local:11434" - name: COMFYUI_BASE_URL value: "http://comfyui.comfyui.svc.cluster.local:8188" - name: ENABLE_IMAGE_GENERATION value: "true" - name: IMAGE_GENERATION_ENGINE value: "comfyui" - name: ENABLE_OAUTH_SIGNUP value: "true" - name: OAUTH_MERGE_ACCOUNTS_BY_EMAIL value: "true" - name: OAUTH_PROVIDER_NAME value: "Authentik" - name: OPENID_PROVIDER_URL value: "https://auth.jsme.be/application/o/open-webui/.well-known/openid-configuration" - name: OAUTH_SCOPES value: "openid email profile" - name: OAUTH_CLIENT_ID valueFrom: secretKeyRef: name: openwebui-secrets key: OAUTH_CLIENT_ID - name: OAUTH_CLIENT_SECRET valueFrom: secretKeyRef: name: openwebui-secrets key: OAUTH_CLIENT_SECRET - name: WEBUI_SECRET_KEY valueFrom: secretKeyRef: name: openwebui-secrets key: WEBUI_SECRET_KEY volumeMounts: - name: data mountPath: /app/backend/data volumes: - name: data persistentVolumeClaim: claimName: openwebui-pvc