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: