From 0b5276863d9ff531189932408662c1db95bc1094 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=8F=E9=BB=91=20=28AI=20Bot=29?= Date: Fri, 13 Feb 2026 21:14:59 +1100 Subject: [PATCH] chore: professional ollama k8s manifest optimized by github copilot --- ai/ollama.yaml | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/ai/ollama.yaml b/ai/ollama.yaml index 0b7bbfc..9d24e6d 100644 --- a/ai/ollama.yaml +++ b/ai/ollama.yaml @@ -3,13 +3,15 @@ kind: PersistentVolumeClaim metadata: name: ollama-pvc namespace: ai + labels: + app: ollama spec: accessModes: - ReadWriteOnce storageClassName: local-path resources: requests: - storage: 20Gi + storage: 50Gi # 增加容量以支持更多模型 --- apiVersion: apps/v1 kind: Deployment @@ -34,6 +36,9 @@ spec: ports: - containerPort: 11434 name: ollama-port + env: + - name: OLLAMA_MODELS + value: /root/.ollama/models resources: requests: cpu: "500m" @@ -44,6 +49,18 @@ spec: volumeMounts: - name: ollama-data mountPath: /root/.ollama + livenessProbe: + httpGet: + path: / + port: 11434 + initialDelaySeconds: 30 + periodSeconds: 10 + readinessProbe: + httpGet: + path: / + port: 11434 + initialDelaySeconds: 5 + periodSeconds: 5 volumes: - name: ollama-data persistentVolumeClaim: