mirror of
https://github.com/wahyd4/home-docker.git
synced 2026-08-09 04:15:52 +10:00
chore: professional ollama k8s manifest optimized by github copilot
This commit is contained in:
+18
-1
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user