mirror of
https://github.com/bjw-s-labs/helm-charts.git
synced 2025-07-04 08:57:04 +02:00
feat(common): Release common 4.0.0 (#398)
Co-authored-by: lab-assistant[bot] <180935599+lab-assistant[bot]@users.noreply.github.com>
This commit is contained in:
parent
1e210f43e3
commit
a01a89cb13
327 changed files with 11181 additions and 7330 deletions
|
@ -4,15 +4,9 @@ Validate Role values
|
|||
{{- define "bjw-s.common.lib.rbac.role.validate" -}}
|
||||
{{- $rootContext := .rootContext -}}
|
||||
{{- $roleValues := .object -}}
|
||||
{{- $type := required "The role needs to have an explicitly declared type" $roleValues.type -}}
|
||||
{{- $typeList := list "Role" "ClusterRole" -}}
|
||||
{{- $rules := $roleValues.rules -}}
|
||||
|
||||
{{- if not (mustHas $type $typeList) -}}
|
||||
{{- fail (printf "\nYou selected: `%s`. Type must be one of:\n%s\n" $type ($typeList|toYaml)) -}}
|
||||
{{- end -}}
|
||||
{{- if not $rules -}}
|
||||
{{- fail "Rules can't be empty" -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- end -}}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue