open-webui/kubernetes/helm/templates/ollama-statefulset.yaml
2023-12-24 16:34:33 +01:00

38 lines
No EOL
953 B
YAML

apiVersion: apps/v1
kind: StatefulSet
metadata:
name: ollama
namespace: {{ .Values.namespace }}
spec:
serviceName: "ollama"
replicas: {{ .Values.ollama.replicaCount }}
selector:
matchLabels:
app: ollama
template:
metadata:
labels:
app: ollama
spec:
containers:
- name: ollama
image: {{ .Values.ollama.image }}
ports:
- containerPort: {{ .Values.ollama.servicePort }}
resources:
limits:
cpu: {{ .Values.ollama.resources.limits.cpu }}
memory: {{ .Values.ollama.resources.limits.memory }}
nvidia.com/gpu: {{ .Values.ollama.resources.limits.gpu }}
volumeMounts:
- name: ollama-volume
mountPath: /root/.ollama
tty: true
volumeClaimTemplates:
- metadata:
name: ollama-volume
spec:
accessModes: [ "ReadWriteOnce" ]
resources:
requests:
storage: 1Gi