mirror of
https://github.com/bjw-s-labs/helm-charts.git
synced 2025-07-04 08:57:04 +02:00
14 lines
594 B
Smarty
14 lines
594 B
Smarty
{{/*
|
|
Return a controller by its identifier.
|
|
*/}}
|
|
{{- define "bjw-s.common.lib.controller.getByIdentifier" -}}
|
|
{{- $rootContext := .rootContext -}}
|
|
{{- $identifier := .id -}}
|
|
|
|
{{- $enabledControllers := include "bjw-s.common.lib.controller.enabledControllers" (dict "rootContext" $rootContext) | fromYaml -}}
|
|
{{- $controllerValues := get $enabledControllers $identifier -}}
|
|
|
|
{{- if not (empty $controllerValues) -}}
|
|
{{- include "bjw-s.common.lib.controller.valuesToObject" (dict "rootContext" $rootContext "id" $identifier "values" $controllerValues) -}}
|
|
{{- end -}}
|
|
{{- end -}}
|