mirror of
https://github.com/bjw-s-labs/helm-charts.git
synced 2025-07-04 08:57:04 +02:00
feat(common): Release version 2.0.0-beta.1 (#173)
This commit is contained in:
parent
19767d668c
commit
7b6ee00be6
189 changed files with 3110 additions and 3023 deletions
|
@ -3,14 +3,18 @@ Renders the Persistent Volume Claim objects required by the chart.
|
|||
*/}}
|
||||
{{- define "bjw-s.common.render.pvcs" -}}
|
||||
{{- /* Generate pvc as required */ -}}
|
||||
{{- range $index, $PVC := .Values.persistence -}}
|
||||
{{- if and $PVC.enabled (eq (default "pvc" $PVC.type) "pvc") (not $PVC.existingClaim) -}}
|
||||
{{- $persistenceValues := $PVC -}}
|
||||
{{- if not $persistenceValues.nameOverride -}}
|
||||
{{- $_ := set $persistenceValues "nameOverride" $index -}}
|
||||
{{- end -}}
|
||||
{{- $_ := set $ "ObjectValues" (dict "persistence" $persistenceValues) -}}
|
||||
{{- include "bjw-s.common.class.pvc" $ | nindent 0 -}}
|
||||
{{- range $key, $pvc := .Values.persistence -}}
|
||||
{{- if and $pvc.enabled (eq (default "persistentVolumeClaim" $pvc.type) "persistentVolumeClaim") (not $pvc.existingClaim) -}}
|
||||
{{- $pvcValues := (mustDeepCopy $pvc) -}}
|
||||
|
||||
{{- /* Create object from the raw PVC values */ -}}
|
||||
{{- $pvcObject := (include "bjw-s.common.lib.pvc.valuesToObject" (dict "rootContext" $ "id" $key "values" $pvcValues)) | fromYaml -}}
|
||||
|
||||
{{- /* Perform validations on the PVC before rendering */ -}}
|
||||
{{- include "bjw-s.common.lib.pvc.validate" (dict "rootContext" $ "object" $pvcValues) -}}
|
||||
|
||||
{{- /* Include the PVC class */ -}}
|
||||
{{- include "bjw-s.common.class.pvc" (dict "rootContext" $ "object" $pvcValues) | nindent 0 -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue