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

@ -2,33 +2,31 @@
This template serves as a blueprint for all configMap objects that are created
within the common library.
*/}}
{{- define "bjw-s.common.class.configmap" -}}
{{- $fullName := include "bjw-s.common.lib.chart.names.fullname" . -}}
{{- $configMapName := $fullName -}}
{{- $values := .Values.configmap -}}
{{- define "bjw-s.common.class.configMap" -}}
{{- $rootContext := .rootContext -}}
{{- $configMapObject := .object -}}
{{- if hasKey . "ObjectValues" -}}
{{- with .ObjectValues.configmap -}}
{{- $values = . -}}
{{- end -}}
{{ end -}}
{{- if and (hasKey $values "nameOverride") $values.nameOverride -}}
{{- $configMapName = printf "%v-%v" $configMapName $values.nameOverride -}}
{{- end }}
{{- $labels := merge
($configMapObject.labels | default dict)
(include "bjw-s.common.lib.metadata.allLabels" $rootContext | fromYaml)
-}}
{{- $annotations := merge
($configMapObject.annotations | default dict)
(include "bjw-s.common.lib.metadata.globalAnnotations" $rootContext | fromYaml)
-}}
---
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ $configMapName }}
{{- with (merge ($values.labels | default dict) (include "bjw-s.common.lib.metadata.allLabels" $ | fromYaml)) }}
labels: {{- toYaml . | nindent 4 }}
name: {{ $configMapObject.name }}
{{- with $labels }}
labels: {{- toYaml . | nindent 4 -}}
{{- end }}
{{- with (merge ($values.annotations | default dict) (include "bjw-s.common.lib.metadata.globalAnnotations" $ | fromYaml)) }}
annotations: {{- toYaml . | nindent 4 }}
{{- with $annotations }}
annotations: {{- toYaml . | nindent 4 -}}
{{- end }}
data:
{{- with $values.data }}
{{- tpl (toYaml .) $ | nindent 2 }}
{{- end }}
{{- with $configMapObject.data }}
{{- tpl (toYaml .) $rootContext | nindent 2 }}
{{- end }}
{{- end -}}