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

13 lines
426 B
Smarty

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