helm-charts/charts/library/common/templates/lib/configMap/_getByIdentifier.tpl
Bernd Schorgers a548690b00
feat(common): Release v2.5.0 (#258)
Co-authored-by: Maurits <75321636+maurits-funda@users.noreply.github.com>
Co-authored-by: Noam Lerner <bugok@users.noreply.github.com>
2024-01-16 20:28:41 +00:00

12 lines
474 B
Smarty

{{/*
Return a configMap Object by its Identifier.
*/}}
{{- define "bjw-s.common.lib.configMap.getByIdentifier" -}}
{{- $rootContext := .rootContext -}}
{{- $identifier := .id -}}
{{- $configMapValues := dig $identifier nil $rootContext.Values.configMaps -}}
{{- if not (empty $configMapValues) -}}
{{- include "bjw-s.common.lib.configMap.valuesToObject" (dict "rootContext" $rootContext "id" $identifier "values" $configMapValues) -}}
{{- end -}}
{{- end -}}