Argo Workflows: avoid creating ClusterRoles and CRBs if singleNamespace is true
Signed-off-by: g-linville <53102776+g-linville@users.noreply.github.com>
This commit is contained in:
parent
b8f483fb73
commit
67ea7f61f2
4 changed files with 12 additions and 0 deletions
|
@ -111,6 +111,8 @@ rules:
|
|||
- update
|
||||
- patch
|
||||
- delete
|
||||
|
||||
{{- if not .Values.singleNamespace }}
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
|
@ -132,3 +134,4 @@ rules:
|
|||
- delete
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
|
|
@ -19,6 +19,8 @@ subjects:
|
|||
- kind: ServiceAccount
|
||||
name: {{ .Values.server.serviceAccount }}
|
||||
namespace: {{ .Release.Namespace }}
|
||||
|
||||
{{- if not .Values.singleNamespace }}
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRoleBinding
|
||||
|
@ -32,4 +34,5 @@ subjects:
|
|||
- kind: ServiceAccount
|
||||
name: {{ .Values.server.serviceAccount }}
|
||||
namespace: {{ .Release.Namespace }}
|
||||
{{- end }}
|
||||
{{- end -}}
|
||||
|
|
|
@ -129,6 +129,8 @@ rules:
|
|||
- update
|
||||
- patch
|
||||
- delete
|
||||
|
||||
{{- if not .Values.singleNamespace }}
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
|
@ -144,3 +146,4 @@ rules:
|
|||
- get
|
||||
- list
|
||||
- watch
|
||||
{{- end }}
|
||||
|
|
|
@ -29,6 +29,8 @@ subjects:
|
|||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{- if not .Values.singleNamespace }}
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRoleBinding
|
||||
|
@ -42,3 +44,4 @@ subjects:
|
|||
- kind: ServiceAccount
|
||||
name: {{ .Values.controller.serviceAccount }}
|
||||
namespace: {{ .Release.Namespace }}
|
||||
{{- end }}
|
||||
|
|
Loading…
Reference in a new issue