feat(common): Release version 2.0.0-beta.1 (#173)

This commit is contained in:
Bᴇʀɴᴅ Sᴄʜᴏʀɢᴇʀs 2023-09-13 11:24:23 +02:00 committed by GitHub
parent 19767d668c
commit 7b6ee00be6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
189 changed files with 3110 additions and 3023 deletions

View file

@ -1,19 +1,26 @@
{{/*
Renders the configMap objects required by the chart.
*/}}
{{- define "bjw-s.common.render.configmaps" -}}
{{- define "bjw-s.common.render.configMaps" -}}
{{- /* Generate named configMaps as required */ -}}
{{- range $name, $configmap := .Values.configMaps -}}
{{- if $configmap.enabled -}}
{{- $configmapValues := $configmap -}}
{{- range $key, $configMap := .Values.configMaps }}
{{- /* Enable configMap by default, but allow override */ -}}
{{- $configMapEnabled := true -}}
{{- if hasKey $configMap "enabled" -}}
{{- $configMapEnabled = $configMap.enabled -}}
{{- end -}}
{{- /* set the default nameOverride to the configMap name */ -}}
{{- if not $configmapValues.nameOverride -}}
{{- $_ := set $configmapValues "nameOverride" $name -}}
{{ end -}}
{{- if $configMapEnabled -}}
{{- $configMapValues := (mustDeepCopy $configMap) -}}
{{- $_ := set $ "ObjectValues" (dict "configmap" $configmapValues) -}}
{{- include "bjw-s.common.class.configmap" $ | nindent 0 -}}
{{- /* Create object from the raw configMap values */ -}}
{{- $configMapObject := (include "bjw-s.common.lib.configMap.valuesToObject" (dict "rootContext" $ "id" $key "values" $configMapValues)) | fromYaml -}}
{{- /* Perform validations on the configMap before rendering */ -}}
{{- include "bjw-s.common.lib.configMap.validate" (dict "rootContext" $ "object" $configMapObject) -}}
{{/* Include the configMap class */}}
{{- include "bjw-s.common.class.configMap" (dict "rootContext" $ "object" $configMapObject) | nindent 0 -}}
{{- end -}}
{{- end -}}
{{- end -}}