From 70a7b582fdbeb3d3c68d776ed01a58374f6644ad Mon Sep 17 00:00:00 2001 From: kjeld Schouten-Lebbing Date: Fri, 11 Jun 2021 12:34:49 +0200 Subject: [PATCH] ensure we can override the complete PVC name for things like DB's, without prefix or suffix --- charts/library/common/Chart.yaml | 2 +- charts/library/common/templates/classes/_pvc.tpl | 3 +++ charts/library/common/values.yaml | 4 ++++ 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/charts/library/common/Chart.yaml b/charts/library/common/Chart.yaml index 94196cba181..b1b0e5170d3 100644 --- a/charts/library/common/Chart.yaml +++ b/charts/library/common/Chart.yaml @@ -18,4 +18,4 @@ maintainers: name: common sources: type: library -version: 6.1.0 +version: 6.1.1 diff --git a/charts/library/common/templates/classes/_pvc.tpl b/charts/library/common/templates/classes/_pvc.tpl index 8f05af338ca..79169743d74 100644 --- a/charts/library/common/templates/classes/_pvc.tpl +++ b/charts/library/common/templates/classes/_pvc.tpl @@ -15,6 +15,9 @@ within the common library. {{- $pvcName = printf "%v-%v" $pvcName $values.nameOverride -}} {{ end -}} {{ end }} +{{- if $values.forceName -}} + {{- $pvcName = $values.forceName -}} +{{ end }} --- kind: PersistentVolumeClaim apiVersion: v1 diff --git a/charts/library/common/values.yaml b/charts/library/common/values.yaml index 76c1c3f01d3..e0ebefefabb 100644 --- a/charts/library/common/values.yaml +++ b/charts/library/common/values.yaml @@ -322,6 +322,10 @@ persistence: # Valid options are pvc, emptyDir, hostPath or custom type: pvc + # -- force the complete PVC name + # Will not add any prefix or suffix + forceName: "" + # -- Where to mount the volume in the main container. # Defaults to `/`, # setting to '-' creates the volume but disables the volumeMount.