Multi-namespace RBAC support (#60)

Signed-off-by: Jeff Fouchard <jeff.fouchard@fullscript.com>
This commit is contained in:
Jeff Fouchard 2019-05-03 13:13:54 -04:00 committed by Alex Collins
parent e8c195854c
commit 8e324206f8
4 changed files with 22 additions and 3 deletions

View file

@ -1,7 +1,7 @@
apiVersion: v1 apiVersion: v1
description: A Helm chart to install Argo-Events in k8s Cluster description: A Helm chart to install Argo-Events in k8s Cluster
name: argo-events name: argo-events
version: 0.4.0 version: 0.4.1
keywords: keywords:
- argo-events - argo-events
- sensor-controller - sensor-controller

View file

@ -10,6 +10,13 @@ subjects:
- kind: ServiceAccount - kind: ServiceAccount
name: argo-events-sa name: argo-events-sa
namespace: {{ .Release.Namespace }} namespace: {{ .Release.Namespace }}
{{- if .Values.additionalSaNamespaces }}
{{- range $namespace := .Values.additionalSaNamespaces }}
- kind: ServiceAccount
name: argo-events-sa
namespace: {{ $namespace }}
{{- end }}
{{- end }}
--- ---
apiVersion: rbac.authorization.k8s.io/v1 apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole kind: ClusterRole

View file

@ -5,3 +5,13 @@ kind: ServiceAccount
metadata: metadata:
name: argo-events-sa name: argo-events-sa
namespace: {{ .Release.Namespace }} namespace: {{ .Release.Namespace }}
{{- if .Values.additionalSaNamespaces }}
{{- range $namespace := .Values.additionalSaNamespaces }}
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: argo-events-sa
namespace: {{ $namespace }}
{{- end }}
{{- end }}

View file

@ -6,11 +6,13 @@ imagePullPolicy: Always
# ServiceAccount to use for running controller. # ServiceAccount to use for running controller.
serviceAccount: argo-events-sa serviceAccount: argo-events-sa
# Create service accounts in additional namespaces specified
# The SA will always be created in the release namespaces
additionalSaNamespaces: []
# - argo-prod
instanceID: argo-events instanceID: argo-events
# set `singleNamespace` to false to have the controllers # set `singleNamespace` to false to have the controllers
# listen on all namespaces. Otherwise the controllers will listen # listen on all namespaces. Otherwise the controllers will listen
# on the namespace provided # on the namespace provided