From 937cb67c3088dd2bb46eacf90f1ea242d202c85e Mon Sep 17 00:00:00 2001 From: Laszlo Fogas Date: Wed, 15 Sep 2021 08:48:38 +0200 Subject: [PATCH] Support for existingClaim --- charts/common/templates/_pvc.yaml | 2 ++ charts/common/templates/_volumesRef.yaml | 4 ++++ charts/cron-job/charts/common-0.1.0.tgz | Bin 1775 -> 1819 bytes charts/onechart/charts/common-0.1.0.tgz | Bin 1775 -> 1820 bytes .../tests/deployment_volumes_test.yaml | 15 ++++++++++++++- charts/onechart/tests/pvc_test.yaml | 9 +++++++++ values.yaml | 3 +-- 7 files changed, 30 insertions(+), 3 deletions(-) diff --git a/charts/common/templates/_pvc.yaml b/charts/common/templates/_pvc.yaml index 7ccd083..5698998 100644 --- a/charts/common/templates/_pvc.yaml +++ b/charts/common/templates/_pvc.yaml @@ -1,5 +1,6 @@ {{- define "common.pvc.tpl" -}} {{- range .Values.volumes }} +{{- if not .existingClaim }} {{- $robustName := include "common.robustName" $.Release.Name }} --- apiVersion: v1 @@ -15,4 +16,5 @@ spec: requests: storage: {{ .size | default "1Gi" }} {{- end }} +{{- end }} {{- end -}} diff --git a/charts/common/templates/_volumesRef.yaml b/charts/common/templates/_volumesRef.yaml index cd027b4..9f44c83 100644 --- a/charts/common/templates/_volumesRef.yaml +++ b/charts/common/templates/_volumesRef.yaml @@ -4,7 +4,11 @@ volumes: {{- range .Values.volumes }} - name: {{ .name }} persistentVolumeClaim: + {{- if .existingClaim }} + claimName: {{ .existingClaim }} + {{ else }} claimName: {{ printf "%s-%s" $.Release.Name .name }} + {{- end }} {{- end }} {{- range .Values.sealedFileSecrets }} - name: {{ .name }} diff --git a/charts/cron-job/charts/common-0.1.0.tgz b/charts/cron-job/charts/common-0.1.0.tgz index 47fc1a7d6ad54d2565613f1b3e41ddca448ade22..52b645bf0d5638222fe6857f7a3965dff192a1ae 100644 GIT binary patch delta 1779 zcmVXFbK7ll{|NEK9cI00#PDk?!st?z%0KMfxQ`K}%zs z8;Vp(%4s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o?S(QiZL*AlORB)UW*X3l2X&=S&L?PG>b+OrlE0# zBz!Na#puv&cH-KSTiPioDI);GxIL-V}eSnJT=Sa$$uuL ze=LRL|4Pezv`ML~;y+Cff7xReu&w@c?w7y+dl%hKjsHVf1^!nyzy>lX_x(DwFrb=~ zh`ND@S`(kJcuf3xwy`K?e06>RAe;+LG!;BUW4ZuYI^h-r4OpTy%I1`Y*oTIe2{z^o zgFKM;vBvOK7H%O^8QKiRNHO)Bcz-Ptu2bJ>qB6{b?!#jvQ&H2 zxk1rcAHFZ%ZmvC;q+ruP=v&*W|Jp0R|9`shYWyF>*5dzA&{xYEXeXq{RaL@V)&%C}&CW^al5qNB zqDbZ8yl^-Fg~ncE`fM86do;DOd+wI;ziW~pI^sg&{(WrIf8Fyk|F?U+Ud{i9uw!^f zv_{DlXaVUCfaw@H3=+yh%102B;Es$?xy~{CHl_+x630Sn1!|0p!GDN}0YpRxW6DQo zAdwMGCkR%hEZPYVonzoQvPm@j7)u<|PZ+|K>M{J~g$qW;fZ%qd3CZv~Fv`(&+*j8h zuCG4I!1vaYt0Q>}wjn;|~6iE&G}`j7Kf=lHaNcZ!IPokl-$f?b)|- zPF*#Pol|!}?wnIsM?mIUNIG&(|K%LR4UtqN3jY4;XXUuD6u)Dj9hZhkT4{GFes|o7 d3Pgylng?sEt+sF3{uclM|NpUaRf7OH007>gdvO2& diff --git a/charts/onechart/charts/common-0.1.0.tgz b/charts/onechart/charts/common-0.1.0.tgz index 7a08785331da9939d067515a6c873988b604f353..f99311bcc010c2c7289a136953807ddece3305b9 100644 GIT binary patch delta 1780 zcmVXFbK7ll{|NEK9cI00#PDk?!st?z%0KMfxQ`K}%zs z8;Vp(%4s&q;ojli@SfyAQjTRww(G6qZVwtDjzkSPBZ~9WZ-$CQk_g^8pAxD4JCd-2 z-AfPz!Jyx_|AQbX{|~}`_aN+t-Jlot`u*@A2)q6M*#QL4;D1X+GNp+;2tM0Z`R2Y7 zAt}8=si@#Xn037vRU~Pu?fDP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