Skip to content

Commit

Permalink
more than one listed resource needed
Browse files Browse the repository at this point in the history
  • Loading branch information
ashleywang1 committed Aug 21, 2024
1 parent 34b1a3b commit fa4e4bf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion codegen/templates/chart/operator-rbac.yamltmpl
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ Prefixed with '#' to avoid printing variable values in yaml, per https://github.

{{- range $entry := $[[ $operatorVar ]].namespacedRbac }}
[[- /* If resources were chosen but no namespaces were chosen, default to restricting those resources to the Release.Namespace. */]]
{{- if and (eq (len $entry.namespaces) 0) (ge (len $entry.resources) 0) }}
{{- if and (eq (len $entry.namespaces) 0) (ge (len $entry.resources) 1) }}
{{- set $[[ $operatorVar ]]NsToResources $.Release.Namespace ($entry.resources | mustUniq) }}
{{- end }}
[[- /* Otherwise, iterate through each of the namespaces and resources listed */]]
Expand Down

0 comments on commit fa4e4bf

Please sign in to comment.