Skip to content
This repository has been archived by the owner on Nov 1, 2022. It is now read-only.

Commit

Permalink
Check for allowed namespaces when providing a clusterrole
Browse files Browse the repository at this point in the history
Found an issue where, when providing your own clusterRole, flux is not
able to provision in namespaces other than it's own. The work around is
to add all namespaces to the allowedNamespaces value but this change
will not add that option if a clusterRole name has been provided

* Add second condition for adding allowed namspeaces

Signed-off-by: David Curran <[email protected]>
Signed-off-by: Kingdon Barrett <[email protected]>
  • Loading branch information
david-curran-90 authored and Kingdon Barrett committed Aug 18, 2021
1 parent 4358a3b commit 2e0b733
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion chart/flux/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ spec:
name: {{ .Values.env.secretName }}
{{- end }}
args:
{{- if not .Values.clusterRole.create }}
{{- if and (not .Values.clusterRole.create) ( .Values.allowedNamespaces) }}
- --k8s-allow-namespace={{ join "," (append .Values.allowedNamespaces .Release.Namespace) }}
{{- end}}
{{- if .Values.defaultNamespace }}
Expand Down

0 comments on commit 2e0b733

Please sign in to comment.