feat(common): Release common 4.0.0 (#398)

Co-authored-by: lab-assistant[bot] <180935599+lab-assistant[bot]@users.noreply.github.com>
This commit is contained in:
Bernd Schorgers 2025-05-16 08:40:39 +02:00
parent 1e210f43e3
commit a01a89cb13
No known key found for this signature in database
327 changed files with 11181 additions and 7330 deletions

View file

@ -1,26 +1,16 @@
{{/*
Renders the Persistent Volume Claim objects required by the chart.
Renders the Persistent Volume Claim objects required by the chart
*/}}
{{- define "bjw-s.common.render.pvcs" -}}
{{- $rootContext := $ -}}
{{- /* Generate pvc as required */ -}}
{{- range $key, $pvc := .Values.persistence -}}
{{- /* Enable PVC by default, but allow override */ -}}
{{- $pvcEnabled := true -}}
{{- if hasKey $pvc "enabled" -}}
{{- $pvcEnabled = $pvc.enabled -}}
{{- end -}}
{{- $enabledPVCs := (include "bjw-s.common.lib.pvc.enabledPVCs" (dict "rootContext" $rootContext) | fromYaml ) -}}
{{- range $identifier := keys $enabledPVCs -}}
{{- /* Generate object from the raw persistence values */ -}}
{{- $pvcObject := (include "bjw-s.common.lib.pvc.getByIdentifier" (dict "rootContext" $rootContext "id" $identifier) | fromYaml) -}}
{{- if and $pvcEnabled (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 -}}
{{- /* Include the PVC class */ -}}
{{- include "bjw-s.common.class.pvc" (dict "rootContext" $rootContext "object" $pvcObject) | nindent 0 -}}
{{- end -}}
{{- end -}}