helm-charts/charts/library/common/templates/lib/service/_getByIdentifier.tpl
2025-06-11 14:09:46 +00:00

12 lines
439 B
Smarty

{{/*
Return a service Object by its Identifier.
*/}}
{{- define "bjw-s.common.lib.service.getByIdentifier" -}}
{{- $rootContext := .rootContext -}}
{{- $identifier := .id -}}
{{- $enabledServices := (include "bjw-s.common.lib.service.enabledServices" (dict "rootContext" $rootContext) | fromYaml ) }}
{{- if (hasKey $enabledServices $identifier) -}}
{{- get $enabledServices $identifier | toYaml -}}
{{- end -}}
{{- end -}}