From 00f7eee104b2875e9dd1db9b5b46de8edbe9c451 Mon Sep 17 00:00:00 2001 From: Kjeld Schouten-Lebbing Date: Mon, 6 Jun 2022 18:17:50 +0200 Subject: [PATCH] fix VCT name rendering --- charts/common/Chart.yaml | 2 +- charts/common/templates/lib/controller/_volumeMounts.tpl | 2 +- charts/common/templates/lib/controller/_volumes.tpl | 2 +- charts/common/templates/pods/_statefulset.tpl | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/charts/common/Chart.yaml b/charts/common/Chart.yaml index 28e14176..9b2b5b16 100644 --- a/charts/common/Chart.yaml +++ b/charts/common/Chart.yaml @@ -15,4 +15,4 @@ maintainers: name: common sources: null type: library -version: 10.0.4 +version: 10.0.5 diff --git a/charts/common/templates/lib/controller/_volumeMounts.tpl b/charts/common/templates/lib/controller/_volumeMounts.tpl index 52c02fd6..ab07aa09 100644 --- a/charts/common/templates/lib/controller/_volumeMounts.tpl +++ b/charts/common/templates/lib/controller/_volumeMounts.tpl @@ -28,7 +28,7 @@ {{- if eq .Values.controller.type "statefulset" }} {{- range $index, $vct := .Values.volumeClaimTemplates }} - mountPath: {{ $vct.mountPath }} - name: {{ $vct.name }} + name: {{ tpl ( toString $index ) $ }} {{- if $vct.subPath }} subPath: {{ $vct.subPath }} {{- end }} diff --git a/charts/common/templates/lib/controller/_volumes.tpl b/charts/common/templates/lib/controller/_volumes.tpl index 21a705b4..e2b3be36 100644 --- a/charts/common/templates/lib/controller/_volumes.tpl +++ b/charts/common/templates/lib/controller/_volumes.tpl @@ -4,7 +4,7 @@ Volumes included by the controller. {{- define "tc.common.controller.volumes" -}} {{- range $index, $persistence := .Values.persistence }} {{- if $persistence.enabled }} -- name: {{ tpl $index $ }} +- name: {{ tpl ( toString $index ) $ }} {{- if eq (default "pvc" $persistence.type) "pvc" }} {{- $pvcName := (include "tc.common.names.fullname" $) -}} {{- if $persistence.existingClaim }} diff --git a/charts/common/templates/pods/_statefulset.tpl b/charts/common/templates/pods/_statefulset.tpl index 0d39c1e8..c603c4e7 100644 --- a/charts/common/templates/pods/_statefulset.tpl +++ b/charts/common/templates/pods/_statefulset.tpl @@ -49,7 +49,7 @@ spec: volumeClaimTemplates: {{- range $index, $vct := .Values.volumeClaimTemplates }} - metadata: - name: {{ $vct.name }} + name: {{ tpl ( toString $index ) $ }} spec: accessModes: - {{ tpl ( $vct.accessMode | default "ReadWriteOnce" ) $ | quote }}