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:
parent
5b89b5d852
commit
97e896126c
8 changed files with 56 additions and 6 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue