mirror of
https://github.com/bjw-s-labs/helm-charts.git
synced 2025-07-03 08:37:03 +02:00
12 lines
482 B
Smarty
12 lines
482 B
Smarty
{{/*
|
|
Return a RoleBinding Object by its Identifier.
|
|
*/}}
|
|
{{- define "bjw-s.common.lib.rbac.roleBinding.getByIdentifier" -}}
|
|
{{- $rootContext := .rootContext -}}
|
|
{{- $identifier := .id -}}
|
|
|
|
{{- $roleBindingValues := dig $identifier nil $rootContext.Values.rbac.bindings -}}
|
|
{{- if not (empty $roleBindingValues) -}}
|
|
{{- include "bjw-s.common.lib.valuesToObject" (dict "rootContext" $rootContext "id" $identifier "values" $roleBindingValues) -}}
|
|
{{- end -}}
|
|
{{- end -}}
|