From 90c9a7a32f850e576274c1bd379c8b60272400b2 Mon Sep 17 00:00:00 2001 From: kjeld Schouten-Lebbing Date: Mon, 12 Apr 2021 17:48:45 +0200 Subject: [PATCH] Take nameOverride into account when creating a volume based on a PVC --- library/common/Chart.yaml | 2 +- library/common/templates/lib/controller/_volumes.tpl | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/library/common/Chart.yaml b/library/common/Chart.yaml index 31d57a2b82b..8d3a9d0f658 100644 --- a/library/common/Chart.yaml +++ b/library/common/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v2 kubeVersion: ">=1.16.0-0" name: common -version: 2.2.1 +version: 2.2.2 # upstream_version: appVersion: none description: Function library for TrueCharts diff --git a/library/common/templates/lib/controller/_volumes.tpl b/library/common/templates/lib/controller/_volumes.tpl index 792b9b9c658..4a96831b41d 100644 --- a/library/common/templates/lib/controller/_volumes.tpl +++ b/library/common/templates/lib/controller/_volumes.tpl @@ -35,7 +35,9 @@ Volumes included by the controller. {{- else -}} {{- /* Otherwise refer to the PVC name */}} persistentVolumeClaim: - {{- if $persistence.nameSuffix }} + {{- if $persistence.nameOverride }} + claimName: {{ $persistence.nameOverride }} + {{- else if $persistence.nameSuffix }} claimName: {{ printf "%s-%s" (include "common.names.fullname" $) $persistence.nameSuffix }} {{- else }} claimName: {{ printf "%s-%s" (include "common.names.fullname" $) $index }}