Skip to content

Commit

Permalink
adding k8s objects
Browse files Browse the repository at this point in the history
  • Loading branch information
Kirill Orlov committed Aug 20, 2024
1 parent 78b8514 commit abf5188
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 0 deletions.
27 changes: 27 additions & 0 deletions kube/chat-summarizer.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
apiVersion: batch/v1
kind: CronJob
metadata:
name: chatsummarizer
spec:
schedule: "0 19 * * *"
jobTemplate:
spec:
template:
metadata:
labels:
app.kubernetes.io/app: chatsummarizer
spec:
volumes:
- name: shared
persistentVolumeClaim:
claimName: ollama
containers:
- name: ollama
image: ollama/ollama:latest
volumeMounts:
- mountPath: /ollama/
name: shared
envFrom:
- secretRef:
name: chatsummarizer-secret
optional: true
10 changes: 10 additions & 0 deletions kube/deployment.yaml → kube/ollama.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,19 @@ spec:
values:
- niflheimr
- midgard
volumes:
- name: shared
persistentVolumeClaim:
claimName: ollama
containers:
- name: ollama
image: ollama/ollama:latest
volumeMounts:
- mountPath: /root/.ollama
name: shared
resources:
requests:
memory: "8Gi"
ports:
- name: http
protocol: TCP
Expand Down
14 changes: 14 additions & 0 deletions kube/pvc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
finalizers:
- kubernetes.io/pvc-protection
name: ollama
spec:
accessModes:
- ReadWriteMany
resources:
requests:
storage: 20Gi
storageClassName: longhorn
---

0 comments on commit abf5188

Please sign in to comment.