mirror of
https://github.com/bjw-s-labs/helm-charts.git
synced 2025-07-04 08:57:04 +02:00
Co-authored-by: lab-assistant[bot] <180935599+lab-assistant[bot]@users.noreply.github.com>
13 lines
652 B
Smarty
13 lines
652 B
Smarty
{{/*
|
|
Return a RoleBinding Object by its Identifier.
|
|
*/}}
|
|
{{- define "bjw-s.common.lib.rbac.roleBinding.getByIdentifier" -}}
|
|
{{- $rootContext := .rootContext -}}
|
|
{{- $identifier := .id -}}
|
|
{{- $enabledRoleBindings := (include "bjw-s.common.lib.rbac.roleBinding.enabledRoleBindings" (dict "rootContext" $rootContext) | fromYaml ) }}
|
|
|
|
{{- if (hasKey $enabledRoleBindings $identifier) -}}
|
|
{{- $objectValues := get $enabledRoleBindings $identifier -}}
|
|
{{- include "bjw-s.common.lib.valuesToObject" (dict "rootContext" $rootContext "id" $identifier "values" $objectValues "itemCount" (len $enabledRoleBindings)) -}}
|
|
{{- end -}}
|
|
{{- end -}}
|