1d12cb574e
- Add one-click deploy script (k8s/deploy.sh) for test + prod - Add startupProbe to backend (60x10s = 10min grace for ML model loading) - Add configmap.yaml and secret.yaml (envsubst from backend/.env) - Fix image URLs: add registry.plfai.cn prefix - Fix frontend: API base URL relative (/api/v1), login-required mode - Remove hardcoded localhost references from frontend - Clean broken kustomize overlays - Add nodeAffinity for backend→k8smaster, frontend→plf-cvm/k8smaster - Remove dead ReplicaSets and stale pods during deploy
71 lines
1.8 KiB
YAML
71 lines
1.8 KiB
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: backend
|
|
labels:
|
|
app: graphrag
|
|
component: backend
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
app: graphrag
|
|
component: backend
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: graphrag
|
|
component: backend
|
|
spec:
|
|
containers:
|
|
- name: backend
|
|
image: registry.plfai.cn/graphrag-backend:latest
|
|
imagePullPolicy: IfNotPresent
|
|
ports:
|
|
- containerPort: 8000
|
|
protocol: TCP
|
|
envFrom:
|
|
- configMapRef:
|
|
name: graphrag-config
|
|
- secretRef:
|
|
name: graphrag-secrets
|
|
volumeMounts:
|
|
- name: backend-data
|
|
mountPath: /app/backend/data
|
|
- name: mineru-output
|
|
mountPath: /app/mineru_mvp/output
|
|
resources:
|
|
requests:
|
|
memory: "512Mi"
|
|
cpu: "250m"
|
|
limits:
|
|
memory: "2Gi"
|
|
cpu: "1000m"
|
|
startupProbe:
|
|
httpGet:
|
|
path: /api/v1/health
|
|
port: 8000
|
|
initialDelaySeconds: 30
|
|
periodSeconds: 10
|
|
failureThreshold: 60
|
|
livenessProbe:
|
|
httpGet:
|
|
path: /api/v1/health
|
|
port: 8000
|
|
initialDelaySeconds: 0
|
|
periodSeconds: 30
|
|
failureThreshold: 3
|
|
readinessProbe:
|
|
httpGet:
|
|
path: /api/v1/health
|
|
port: 8000
|
|
initialDelaySeconds: 0
|
|
periodSeconds: 10
|
|
volumes:
|
|
- name: backend-data
|
|
persistentVolumeClaim:
|
|
claimName: backend-data-pvc
|
|
- name: mineru-output
|
|
persistentVolumeClaim:
|
|
claimName: mineru-output-pvc
|