From 22376d6cd3d2dce420b6ca7f35ad1b2c8cb33785 Mon Sep 17 00:00:00 2001 From: Zheyi Zhu Date: Sun, 28 Dec 2025 02:39:38 -0700 Subject: [PATCH] [helm] use existing pvc claim of provided (#547) --- helm/opengist/templates/deployment.yaml | 4 ++++ helm/opengist/templates/pvc.yaml | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/helm/opengist/templates/deployment.yaml b/helm/opengist/templates/deployment.yaml index 72ed6e2..0ef5a36 100644 --- a/helm/opengist/templates/deployment.yaml +++ b/helm/opengist/templates/deployment.yaml @@ -95,7 +95,11 @@ spec: - name: opengist-data {{- if .Values.persistence.enabled }} persistentVolumeClaim: + {{- if .Values.persistence.existingClaim }} + claimName: {{ .Values.persistence.existingClaim }} + {{- else }} claimName: {{ include "opengist.fullname" . }}-data + {{- end }} {{- else }} emptyDir: {} {{- end }} diff --git a/helm/opengist/templates/pvc.yaml b/helm/opengist/templates/pvc.yaml index f4eaa2b..94f2160 100644 --- a/helm/opengist/templates/pvc.yaml +++ b/helm/opengist/templates/pvc.yaml @@ -1,4 +1,4 @@ -{{- if .Values.persistence.enabled }} +{{- if and .Values.persistence.enabled (not .Values.persistence.existingClaim) }} kind: PersistentVolumeClaim apiVersion: v1 metadata: