mirror of
https://github.com/bjw-s-labs/helm-charts.git
synced 2025-07-03 16:37: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
|
@ -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 -}}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue