Add Ollama and Open WebUI deployment to Kubernetes and migration plan
This commit is contained in:
@@ -0,0 +1,103 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: open-webui
|
||||
namespace: ollama
|
||||
labels:
|
||||
app: open-webui
|
||||
spec:
|
||||
replicas: 1
|
||||
strategy:
|
||||
type: Recreate
|
||||
selector:
|
||||
matchLabels:
|
||||
app: open-webui
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: open-webui
|
||||
spec:
|
||||
containers:
|
||||
- name: open-webui
|
||||
image: ghcr.io/open-webui/open-webui:main
|
||||
imagePullPolicy: Always
|
||||
env:
|
||||
- name: OLLAMA_BASE_URL
|
||||
value: "http://ollama.ollama.svc.cluster.local:11434"
|
||||
- name: WEBUI_URL
|
||||
value: "http://chat.mariushome.lt"
|
||||
- name: PORT
|
||||
value: "8080"
|
||||
- name: ENABLE_SIGNUP
|
||||
value: "false"
|
||||
- name: ENABLE_LOGIN_FORM
|
||||
value: "true"
|
||||
- name: ENABLE_RAG
|
||||
value: "true"
|
||||
- name: RAG_EMBEDDING_ENGINE
|
||||
value: "ollama"
|
||||
- name: RAG_EMBEDDING_MODEL
|
||||
value: "nomic-embed-text"
|
||||
- name: VECTOR_DB
|
||||
value: "pgvector"
|
||||
- name: ENABLE_PERSISTENT_CONFIG
|
||||
value: "true"
|
||||
- name: WEBUI_SECRET_KEY
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: openwebui-secret
|
||||
key: WEBUI_SECRET_KEY
|
||||
- name: WEBUI_ADMIN_EMAIL
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: openwebui-secret
|
||||
key: WEBUI_ADMIN_EMAIL
|
||||
- name: WEBUI_ADMIN_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: openwebui-secret
|
||||
key: WEBUI_ADMIN_PASSWORD
|
||||
- name: DATABASE_URL
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: openwebui-secret
|
||||
key: DATABASE_URL
|
||||
- name: PGVECTOR_DB_URL
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: openwebui-secret
|
||||
key: PGVECTOR_DB_URL
|
||||
ports:
|
||||
- containerPort: 8080
|
||||
name: http
|
||||
protocol: TCP
|
||||
resources:
|
||||
requests:
|
||||
cpu: "250m"
|
||||
memory: 512Mi
|
||||
limits:
|
||||
cpu: "2"
|
||||
memory: 4Gi
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /health
|
||||
port: 8080
|
||||
initialDelaySeconds: 60
|
||||
periodSeconds: 30
|
||||
timeoutSeconds: 5
|
||||
failureThreshold: 5
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /health
|
||||
port: 8080
|
||||
initialDelaySeconds: 30
|
||||
periodSeconds: 10
|
||||
timeoutSeconds: 5
|
||||
failureThreshold: 5
|
||||
# Fresh PostgreSQL install: uploads go to emptyDir. Add a PVC later if needed.
|
||||
volumeMounts:
|
||||
- name: data
|
||||
mountPath: /app/backend/data
|
||||
volumes:
|
||||
- name: data
|
||||
emptyDir: {}
|
||||
Reference in New Issue
Block a user