fixing data null type fot vol

This commit is contained in:
ari committed 2025-05-18 22:31:46 -04:00
1 parent b5eb80d338
commit 566508f06c
1 file changed
+6 -3
+6 -3
View File
@@ -1,6 +1,9 @@
{{ range $name, $data := .Values.volumes}}
{{ if (eq $data.type "nfs") }}
{{ $data := $data | default (dict) }}
{{- $volType := ($data.type | default "") -}}
{{ if (eq $volType "nfs") }}
{{- $vname := printf "%s-nfs-%s" $.Release.Namespace $name -}}
@@ -49,8 +52,8 @@ spec:
resources:
requests:
storage: {{ $data.size | default "1Gi" | quote }}
{{- if $data.type }}
storageClassName: {{ $data.type | quote }}
{{- if $volType }}
storageClassName: {{ $volType | quote }}
{{- end }}
persistentVolumeReclaimPolicy: {{ $data.persistentVolumeReclaimPolicy | default "Retain"}}
{{ end }}