chore(argo-cd): create roles instead of rolebindings when singleNamespace is true (#530)

Co-authored-by: Vlad Losev <vladlosev@users.noreply.github.com>
Co-authored-by: Sean Johnson <seanson@users.noreply.github.com>
This commit is contained in:
Alex Sears 2021-02-16 18:06:11 -05:00 committed by GitHub
parent 5b89b5d852
commit 97e896126c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 56 additions and 6 deletions

View file

@ -8,7 +8,11 @@ metadata:
name: {{ .Release.Name }}-{{ .Values.controller.name }}
roleRef:
apiGroup: rbac.authorization.k8s.io
{{- if .Values.singleNamespace }}
kind: Role
{{ else }}
kind: ClusterRole
{{- end }}
name: {{ .Release.Name }}-{{ .Values.controller.name }}
subjects:
- kind: ServiceAccount
@ -27,12 +31,20 @@ subjects:
{{- end }}
---
apiVersion: rbac.authorization.k8s.io/v1
{{- if .Values.singleNamespace }}
kind: RoleBinding
{{ else }}
kind: ClusterRoleBinding
{{- end }}
metadata:
name: {{ .Release.Name }}-{{ .Values.controller.name }}-cluster-template
roleRef:
apiGroup: rbac.authorization.k8s.io
{{- if .Values.singleNamespace }}
kind: Role
{{ else }}
kind: ClusterRole
{{- end }}
name: {{ .Release.Name }}-{{ .Values.controller.name }}-cluster-template
subjects:
- kind: ServiceAccount