fix VCT name rendering

This commit is contained in:
Kjeld Schouten-Lebbing
2022-06-06 18:17:50 +02:00
parent c072b93618
commit 00f7eee104
4 changed files with 4 additions and 4 deletions

View File

@@ -15,4 +15,4 @@ maintainers:
name: common
sources: null
type: library
version: 10.0.4
version: 10.0.5

View File

@@ -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 }}

View File

@@ -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 }}

View File

@@ -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 }}