Take nameOverride into account when creating a volume based on a PVC

This commit is contained in:
kjeld Schouten-Lebbing
2021-04-12 17:48:45 +02:00
parent aa714269e4
commit 90c9a7a32f
2 changed files with 4 additions and 2 deletions
+1 -1
View File
@@ -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
@@ -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 }}