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