Skip to content

Commit

Permalink
Address 'helm lint' error <.watch.namespaces>: nil pointer (#1913)
Browse files Browse the repository at this point in the history
* Address 'helm lint' error <.watch.namespaces>: nil pointer

Signed-off-by: Petr McAllister <petr.mcallister@gmail.com>
  • Loading branch information
Petr McAllister authored Sep 30, 2023
1 parent 96fd1dd commit 7d9e16e
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions charts/gateway-helm/templates/envoy-gateway-rbac.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
{{ $watchedNamespaces := list }}
{{ if $kube := .Values.config.envoyGateway.provider.kubernetes }}
{{ if and $kube.watch $kube.watch.namespaces }}
{{ if .Values.config.envoyGateway.provider.kubernetes }}
{{ $kube := .Values.config.envoyGateway.provider.kubernetes }}
{{ if $kube.watch }}
{{ if $kube.watch.namespaces }}
{{ if gt (len $kube.watch.namespaces) 0 }}
{{ $watchedNamespaces = $kube.watch.namespaces }}
{{ end }}
{{ end }}
{{ end }}
{{ end }}
{{ if gt (len $watchedNamespaces) 0 }}
{{ range $_, $ns := $watchedNamespaces }}
---
Expand Down

0 comments on commit 7d9e16e

Please sign in to comment.