From c018648f41a102cb49b1839baa07fd03135d37e1 Mon Sep 17 00:00:00 2001 From: windsource Date: Sat, 2 Nov 2024 17:16:06 +0100 Subject: [PATCH] Support subPath for persistentVolume --- Chart.yaml | 2 +- templates/deployment.yaml | 3 +++ templates/knative/service.yaml | 3 +++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/Chart.yaml b/Chart.yaml index 7848807..16229fb 100644 --- a/Chart.yaml +++ b/Chart.yaml @@ -4,7 +4,7 @@ description: Get up and running with large language models locally. type: application -version: 0.63.0 +version: 0.63.1 appVersion: "0.3.14" diff --git a/templates/deployment.yaml b/templates/deployment.yaml index c2b55b3..b126509 100644 --- a/templates/deployment.yaml +++ b/templates/deployment.yaml @@ -107,6 +107,9 @@ spec: volumeMounts: - name: ollama-data mountPath: {{ .Values.ollama.mountPath | default "/root/.ollama" }} + {{- if .Values.persistentVolume.subPath }} + subPath: {{ .Values.persistentVolume.subPath }} + {{- end }} {{- with .Values.volumeMounts }} {{- toYaml . | nindent 12 }} {{- end }} diff --git a/templates/knative/service.yaml b/templates/knative/service.yaml index b5caf27..2f6ade5 100644 --- a/templates/knative/service.yaml +++ b/templates/knative/service.yaml @@ -62,6 +62,9 @@ spec: volumeMounts: - name: ollama-data mountPath: {{ .Values.ollama.mountPath | default "/root/.ollama" }} + {{- if .Values.persistentVolume.subPath }} + subPath: {{ .Values.persistentVolume.subPath }} + {{- end }} {{- with .Values.volumeMounts }} {{- toYaml . | nindent 12 }} {{- end }}