mirror of
https://github.com/bjw-s-labs/helm-charts.git
synced 2025-07-03 16:37:04 +02:00
feat(common): Release v3.3.0 (#335)
This commit is contained in:
parent
040eb7b9d2
commit
74f3170cec
19 changed files with 386 additions and 10 deletions
26
charts/library/common/templates/render/_rawResources.tpl
Normal file
26
charts/library/common/templates/render/_rawResources.tpl
Normal file
|
@ -0,0 +1,26 @@
|
|||
{{/*
|
||||
Renders other arbirtrary objects required by the chart.
|
||||
*/}}
|
||||
{{- define "bjw-s.common.render.rawResources" -}}
|
||||
{{- /* Generate pvc as required */ -}}
|
||||
{{- range $key, $resource := .Values.rawResources -}}
|
||||
{{- /* Enable by default, but allow override */ -}}
|
||||
{{- $resourceEnabled := true -}}
|
||||
{{- if hasKey $resource "enabled" -}}
|
||||
{{- $resourceEnabled = $resource.enabled -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- if $resourceEnabled -}}
|
||||
{{- $resourceValues := (mustDeepCopy $resource) -}}
|
||||
|
||||
{{- /* Create object from the raw resource values */ -}}
|
||||
{{- $resourceObject := (include "bjw-s.common.lib.rawResource.valuesToObject" (dict "rootContext" $ "id" $key "values" $resourceValues)) | fromYaml -}}
|
||||
|
||||
{{- /* Perform validations on the resource before rendering */ -}}
|
||||
{{- include "bjw-s.common.lib.rawResource.validate" (dict "rootContext" $ "object" $resourceValues) -}}
|
||||
|
||||
{{- /* Include the raw resource class */ -}}
|
||||
{{- include "bjw-s.common.class.rawResource" (dict "rootContext" $ "object" $resourceValues) | nindent 0 -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
Loading…
Add table
Add a link
Reference in a new issue