From fd3526f2d419ebd73b47e4d818ab9c0696b547f4 Mon Sep 17 00:00:00 2001 From: Asutorufa <16442314+Asutorufa@users.noreply.github.com> Date: Mon, 9 Dec 2024 17:32:41 +0800 Subject: [PATCH] add support set subPath for persistence and snapshotPersistence --- charts/qdrant/templates/statefulset.yaml | 12 ++++++++++++ charts/qdrant/values.yaml | 2 ++ 2 files changed, 14 insertions(+) diff --git a/charts/qdrant/templates/statefulset.yaml b/charts/qdrant/templates/statefulset.yaml index 8b67de1..25e426d 100644 --- a/charts/qdrant/templates/statefulset.yaml +++ b/charts/qdrant/templates/statefulset.yaml @@ -57,8 +57,14 @@ spec: volumeMounts: - name: {{ .Values.persistence.storageVolumeName | default "qdrant-storage" }} mountPath: /qdrant/storage + {{- if .Values.persistence.storageSubPath }} + subPath: "{{ .Values.persistence.storageSubPath }}" + {{- end }} - name: {{ .Values.snapshotPersistence.snapshotsVolumeName | default "qdrant-snapshots" }} mountPath: /qdrant/snapshots + {{- if .Values.snapshotPersistence.snapshotsSubPath }} + subPath: "{{ .Values.snapshotPersistence.snapshotsSubPath }}" + {{- end }} {{- if and .Values.snapshotRestoration.enabled .Values.snapshotRestoration.pvcName }} - name: qdrant-snapshot-restoration mountPath: {{ .Values.snapshotRestoration.mountPath }} @@ -171,6 +177,9 @@ spec: volumeMounts: - name: {{ .Values.persistence.storageVolumeName | default "qdrant-storage" }} mountPath: /qdrant/storage + {{- if .Values.persistence.storageSubPath }} + subPath: "{{ .Values.persistence.storageSubPath }}" + {{- end }} - name: qdrant-config mountPath: /qdrant/config/initialize.sh subPath: initialize.sh @@ -188,6 +197,9 @@ spec: {{- end }} - name: {{ .Values.snapshotPersistence.snapshotsVolumeName | default "qdrant-snapshots" }} mountPath: /qdrant/snapshots + {{- if .Values.snapshotPersistence.snapshotsSubPath }} + subPath: "{{ .Values.snapshotPersistence.snapshotsSubPath }}" + {{- end }} - name: qdrant-init mountPath: /qdrant/init {{- if .Values.additionalVolumeMounts }} diff --git a/charts/qdrant/values.yaml b/charts/qdrant/values.yaml index d85f0ea..2435812 100644 --- a/charts/qdrant/values.yaml +++ b/charts/qdrant/values.yaml @@ -142,6 +142,7 @@ persistence: size: 10Gi annotations: {} # storageVolumeName: qdrant-storage + # storageSubPath: "" # storageClassName: local-path # If you use snapshots or the snapshot shard transfer mechanism, we recommend @@ -153,6 +154,7 @@ snapshotPersistence: size: 10Gi annotations: {} # snapshotsVolumeName: qdrant-snapshots + # snapshotsSubPath: "" # You can change the storageClassName to ensure snapshots are saved to cold storage. # storageClassName: local-path