From 9e7387f0f8dfeb4a196635f7b934e68bbda11b16 Mon Sep 17 00:00:00 2001 From: skriesch Date: Sat, 17 Jul 2021 10:47:41 +0800 Subject: [PATCH] Fix for #203 possible existingClaim at persistence with namespace variable in the name (#204) Fix for #203 Co-authored-by: techknowlogick Reviewed-on: https://gitea.com/gitea/helm-chart/pulls/204 Reviewed-by: luhahn Reviewed-by: Lunny Xiao Co-authored-by: skriesch Co-committed-by: skriesch --- templates/gitea/statefulset.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/templates/gitea/statefulset.yaml b/templates/gitea/statefulset.yaml index bb13eea..b00fd93 100644 --- a/templates/gitea/statefulset.yaml +++ b/templates/gitea/statefulset.yaml @@ -244,7 +244,9 @@ spec: {{- if and .Values.persistence.enabled .Values.persistence.existingClaim }} - name: data persistentVolumeClaim: - claimName: {{ .Values.persistence.existingClaim }} + {{- with .Values.persistence.existingClaim }} + claimName: {{ tpl . $ }} + {{- end }} {{- else if not .Values.persistence.enabled }} - name: data emptyDir: {}