2021-03-03 13:56:22 +00:00
|
|
|
{{/*
|
2021-06-10 21:52:55 +00:00
|
|
|
Renders the Persistent Volume Claim objects required by the chart.
|
2021-02-05 20:17:06 +00:00
|
|
|
*/}}
|
|
|
|
{{- define "common.pvc" -}}
|
|
|
|
{{- /* Generate pvc as required */ -}}
|
|
|
|
{{- range $index, $PVC := .Values.persistence }}
|
2021-06-10 21:52:55 +00:00
|
|
|
{{- if and $PVC.enabled (eq (default "pvc" $PVC.type) "pvc") (not $PVC.existingClaim) -}}
|
2021-02-05 20:17:06 +00:00
|
|
|
{{- $persistenceValues := $PVC -}}
|
2021-05-19 18:51:35 +00:00
|
|
|
{{- if not $persistenceValues.nameOverride -}}
|
|
|
|
{{- $_ := set $persistenceValues "nameOverride" $index -}}
|
2021-02-05 20:17:06 +00:00
|
|
|
{{- end -}}
|
|
|
|
{{- $_ := set $ "ObjectValues" (dict "persistence" $persistenceValues) -}}
|
2021-05-10 12:13:17 +00:00
|
|
|
{{- include "common.classes.pvc" $ | nindent 0 -}}
|
2021-02-05 20:17:06 +00:00
|
|
|
{{- end }}
|
|
|
|
{{- end }}
|
|
|
|
{{- end }}
|