mirror of
https://github.com/bjw-s-labs/helm-charts.git
synced 2025-07-04 17:07:04 +02:00
13 lines
466 B
Smarty
13 lines
466 B
Smarty
{{/*
|
|
Return a service Object by its Identifier.
|
|
*/}}
|
|
{{- define "bjw-s.common.lib.service.getByIdentifier" -}}
|
|
{{- $rootContext := .rootContext -}}
|
|
{{- $identifier := .id -}}
|
|
|
|
{{- range $name, $serviceValues := $rootContext.Values.service -}}
|
|
{{- if eq $name $identifier -}}
|
|
{{- include "bjw-s.common.lib.service.valuesToObject" (dict "rootContext" $rootContext "id" $identifier "values" $serviceValues) -}}
|
|
{{- end -}}
|
|
{{- end -}}
|
|
{{- end -}}
|