From fd7c5db7601d16882cd0c4f0d2f71b808088b6e3 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste DETROYES Date: Mon, 15 Jul 2024 15:53:13 +0800 Subject: [PATCH 1/3] feat: add ollama.mountPath --- Chart.yaml | 3 ++- templates/deployment.yaml | 2 +- values.yaml | 3 +++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Chart.yaml b/Chart.yaml index 5657dec..125964e 100644 --- a/Chart.yaml +++ b/Chart.yaml @@ -13,7 +13,8 @@ annotations: artifacthub.io/changes: | - kind: added description: Add shared host namespace hostIPC, hostPID and hostNetwork - + - kind: added + description: add ollama.mountPath to override default ollama mountPath kubeVersion: "^1.16.0-0" home: https://ollama.ai/ diff --git a/templates/deployment.yaml b/templates/deployment.yaml index b7c4d7f..1a2ddfc 100644 --- a/templates/deployment.yaml +++ b/templates/deployment.yaml @@ -96,7 +96,7 @@ spec: {{- end}} volumeMounts: - name: ollama-data - mountPath: /root/.ollama + mountPath: {{ .Values.ollama.mountPath | default "/root/.ollama" }} {{- with .Values.volumeMounts }} {{- toYaml . | nindent 12 }} {{- end }} diff --git a/values.yaml b/values.yaml index ab922fe..a5c2142 100644 --- a/values.yaml +++ b/values.yaml @@ -63,6 +63,9 @@ ollama: # -- Add insecure flag for pulling at container startup insecure: false + # -- Override ollama-data volume mount path, default: "/root/.ollama" + mountPath: "" + # Service account # ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ serviceAccount: From c4aedfab4382e0d38ac649223417e2fdd1095abe Mon Sep 17 00:00:00 2001 From: Jean-Baptiste DETROYES Date: Mon, 15 Jul 2024 15:53:27 +0800 Subject: [PATCH 2/3] docs: update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index ee13ac4..f659ef4 100644 --- a/README.md +++ b/README.md @@ -144,6 +144,7 @@ ingress: | ollama.gpu.type | string | `"nvidia"` | GPU type: 'nvidia' or 'amd' If 'ollama.gpu.enabled', default value is nvidia If set to 'amd', this will add 'rocm' suffix to image tag if 'image.tag' is not override This is due cause AMD and CPU/CUDA are different images | | ollama.insecure | bool | `false` | Add insecure flag for pulling at container startup | | ollama.models | list | `[]` | List of models to pull at container startup The more you add, the longer the container will take to start if models are not present models: - llama2 - mistral | +| ollama.mountPath | string | `""` | Override ollama-data volume mount path, default: "/root/.ollama" | | persistentVolume.accessModes | list | `["ReadWriteOnce"]` | Ollama server data Persistent Volume access modes Must match those of existing PV or dynamic provisioner Ref: http://kubernetes.io/docs/user-guide/persistent-volumes/ | | persistentVolume.annotations | object | `{}` | Ollama server data Persistent Volume annotations | | persistentVolume.enabled | bool | `false` | Enable persistence using PVC | From fcf6a45e63064f4d70581d3fbeb586b067a232ce Mon Sep 17 00:00:00 2001 From: Jean-Baptiste DETROYES Date: Tue, 16 Jul 2024 13:02:39 +0800 Subject: [PATCH 3/3] chore: update values.yaml --- values.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/values.yaml b/values.yaml index a5c2142..e26bfad 100644 --- a/values.yaml +++ b/values.yaml @@ -321,4 +321,4 @@ hostIPC: false hostPID: false # -- Use the host's network namespace. -hostNetwork: false \ No newline at end of file +hostNetwork: false