fixing data null type fot vol
This commit is contained in:
1 parent
b5eb80d338
commit
566508f06c
1 file changed
+6
-3
@@ -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 }}
|
||||
|
||||
Reference in new issue
Block a user