From 1bb422cebc0c8496034eb0ae67ac8f41c152cb81 Mon Sep 17 00:00:00 2001 From: Paimon Sorornejad Date: Wed, 4 Dec 2024 00:47:36 -0500 Subject: [PATCH] Fix issue where pvc range produced multiple volume keys (#137) --- charts/vaultwarden/Chart.yaml | 2 +- charts/vaultwarden/templates/deployment.yaml | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/charts/vaultwarden/Chart.yaml b/charts/vaultwarden/Chart.yaml index e2329f1..be8df19 100644 --- a/charts/vaultwarden/Chart.yaml +++ b/charts/vaultwarden/Chart.yaml @@ -13,5 +13,5 @@ maintainers: - name: guerzon email: guerzon@proton.me url: https://github.com/guerzon -version: 0.31.0 +version: 0.31.1 kubeVersion: ">=1.12.0-0" diff --git a/charts/vaultwarden/templates/deployment.yaml b/charts/vaultwarden/templates/deployment.yaml index fb89c5b..4de3f21 100644 --- a/charts/vaultwarden/templates/deployment.yaml +++ b/charts/vaultwarden/templates/deployment.yaml @@ -40,11 +40,13 @@ spec: {{- end }} spec: {{- include "vaultwarden.podSpec" . | nindent 6 }} - {{- range $pvc := (fromYaml (include "vaultwarden.pvcSpec" .)).volumeClaimTemplates }} + {{- if not .Values.storage.existingVolumeClaim }} volumes: + {{- range $pvc := (fromYaml (include "vaultwarden.pvcSpec" .)).volumeClaimTemplates }} {{- $newName := printf "%s-%s-0" $pvc.metadata.name $.Release.Name }} - name: {{ $pvc.metadata.name }} persistentVolumeClaim: claimName: {{ $newName }} + {{- end }} {{- end }} {{- end }} \ No newline at end of file