RBAC: Fix issue with inclusion of empty jobs or daemonsets
Currently, the rbac logic would allow for ``jobs`` or ``daemonsets`` if it is specified in the dependencies, even if they may just be empty or null. This patch set addresses this by checking the jobs or daemonsets map in the value.yaml is non-empty before including it in the Role. Change-Id: I67f940e1e71c371b63d8d1e9b4f47af633a6bfa4
This commit is contained in:
parent
2be5abec3d
commit
e234e8d932
@ -36,9 +36,9 @@ metadata:
|
||||
{{- $_ := set $allNamespace $endpointNS (printf "%s%s" "services," ((index $allNamespace $endpointNS) | default "")) }}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- else if eq $k "jobs" }}
|
||||
{{- else if and (eq $k "jobs") $v }}
|
||||
{{- $_ := set $allNamespace $saNamespace (printf "%s%s" "jobs," ((index $allNamespace $saNamespace) | default "")) }}
|
||||
{{- else if eq $k "daemonset" }}
|
||||
{{- else if and (eq $k "daemonset") $v }}
|
||||
{{- $_ := set $allNamespace $saNamespace (printf "%s%s" "daemonsets," ((index $allNamespace $saNamespace) | default "")) }}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
Loading…
Reference in New Issue
Block a user