mirror of
https://github.com/bjw-s-labs/helm-charts.git
synced 2025-07-04 00:47:04 +02:00
12 lines
439 B
Smarty
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 -}}
|