Add ollama service, deployment and pvc
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Tyler Perkins 2024-04-12 21:02:18 -04:00
parent 0193d65ea7
commit 8c4f83d504
3 changed files with 51 additions and 0 deletions

View File

@ -0,0 +1,27 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: ollama-deployment
namespace: ollama-ns
spec:
replicas: 1
selector:
matchLabels:
app: ollama
template:
metadata:
labels:
app: ollama
spec:
containers:
- name: ollama
image: ollama/ollama
ports:
- containerPort: 11434
volumeMounts:
- name: ollama-volume
mountPath: /root/.ollama
volumes:
- name: ollama-volume
persistentVolumeClaim:
claimName: ollama-pvc

12
ollama/ollama-pvc.yaml Normal file
View File

@ -0,0 +1,12 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: ollama-pvc
namespace: ollama-ns
spec:
accessModes:
- ReadWriteOnce
storageClassName: longhorn
resources:
requests:
storage: 200Gi

View File

@ -0,0 +1,12 @@
apiVersion: v1
kind: Service
metadata:
name: ollama-service
namespace: ollama-ns
spec:
type: LoadBalancer
ports:
- port: 11434
targetPort: 11434
selector:
app: ollama