2024-07-06 16:37:26 +00:00
|
|
|
apiVersion: apps/v1
|
|
|
|
kind: Deployment
|
|
|
|
metadata:
|
|
|
|
name: server
|
|
|
|
spec:
|
|
|
|
replicas: 1
|
|
|
|
strategy:
|
|
|
|
type: Recreate
|
|
|
|
selector:
|
|
|
|
matchLabels:
|
|
|
|
app.kubernetes.io/component: server
|
|
|
|
template:
|
|
|
|
metadata:
|
|
|
|
labels:
|
|
|
|
app.kubernetes.io/component: server
|
|
|
|
spec:
|
|
|
|
containers:
|
|
|
|
- name: server
|
|
|
|
image: ghcr.io/open-webui/open-webui:main
|
|
|
|
env:
|
|
|
|
- name: NAMESPACE
|
|
|
|
valueFrom:
|
|
|
|
fieldRef:
|
|
|
|
fieldPath: metadata.namespace
|
|
|
|
- name: OLLAMA_BASE_URL
|
|
|
|
value: http://ollama-server.$(NAMESPACE).svc:11434
|
|
|
|
resources:
|
|
|
|
requests:
|
2024-07-06 21:05:05 +00:00
|
|
|
cpu: 250m
|
2024-07-06 16:37:26 +00:00
|
|
|
memory: 1Gi
|
|
|
|
limits:
|
2024-07-06 21:05:05 +00:00
|
|
|
cpu: 500m
|
2024-07-06 16:37:26 +00:00
|
|
|
memory: 1Gi
|
|
|
|
ports:
|
|
|
|
- containerPort: 8080
|
|
|
|
name: http
|
|
|
|
volumeMounts:
|
|
|
|
- name: server-data-pv
|
|
|
|
mountPath: /app/backend/data
|
|
|
|
volumes:
|
|
|
|
- name: server-data-pv
|
|
|
|
persistentVolumeClaim:
|
|
|
|
claimName: server-data-pvc
|
|
|
|
---
|
|
|
|
apiVersion: v1
|
|
|
|
kind: PersistentVolumeClaim
|
|
|
|
metadata:
|
|
|
|
name: server-data-pvc
|
|
|
|
labels:
|
|
|
|
app.kubernetes.io/name: server
|
|
|
|
spec:
|
|
|
|
accessModes:
|
|
|
|
- ReadWriteOnce
|
|
|
|
resources:
|
|
|
|
requests:
|
|
|
|
storage: 1Gi
|
|
|
|
---
|
|
|
|
apiVersion: v1
|
|
|
|
kind: Service
|
|
|
|
metadata:
|
|
|
|
name: server
|
|
|
|
labels:
|
|
|
|
app.kubernetes.io/component: server
|
|
|
|
spec:
|
|
|
|
selector:
|
|
|
|
app.kubernetes.io/component: server
|
|
|
|
ports:
|
|
|
|
- name: http
|
|
|
|
port: 8080
|
|
|
|
targetPort: http
|