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

13 lines
445 B
Smarty

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