mvisonneau / helm-charts

Personal Helm charts repository
Apache License 2.0
67 stars 58 forks source link

ClusterRoleBinding requires Namespace #50

Open remissio opened 2 years ago

remissio commented 2 years ago

https://github.com/mvisonneau/helm-charts/blob/3c50eb36c030336b7a7b68afb4d87203d91fd1e6/charts/gitlab-ci-pipelines-exporter/templates/serviceaccount.yaml#L21-L23

I'd like to suggest to insert the current Namespace:

subjects:
- kind: ServiceAccount
  name: {{ template "exporter.serviceAccountName" . }}
  namespace: {{ .Release.namespace }}

Kubernetes expects a namespace to be referenced within the ClusterRoleBinding resource. Currently when trying to apply this chart setting "rbac.enabled = true" helm fails.