2023-01-12 21:32:12 +00:00
|
|
|
{{- $config := .Values.server.clusterAdminAccess | default dict -}}
|
|
|
|
{{- if hasKey $config "enabled" | ternary $config.enabled .Values.createClusterRoles }}
|
2022-11-07 19:20:03 +00:00
|
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
|
|
kind: ClusterRole
|
|
|
|
metadata:
|
|
|
|
name: {{ include "argo-cd.server.fullname" . }}
|
|
|
|
labels:
|
|
|
|
{{- include "argo-cd.labels" (dict "context" . "component" .Values.server.name "name" .Values.server.name) | nindent 4 }}
|
|
|
|
rules:
|
|
|
|
- apiGroups:
|
|
|
|
- '*'
|
|
|
|
resources:
|
|
|
|
- '*'
|
|
|
|
verbs:
|
|
|
|
- delete
|
|
|
|
- get
|
|
|
|
- patch
|
|
|
|
- apiGroups:
|
|
|
|
- ""
|
|
|
|
resources:
|
|
|
|
- events
|
|
|
|
verbs:
|
|
|
|
- list
|
2023-11-13 12:59:22 +00:00
|
|
|
{{- if (index .Values.configs.params "application.namespaces") }}
|
|
|
|
- create
|
|
|
|
{{- end }}
|
2022-11-07 19:20:03 +00:00
|
|
|
- apiGroups:
|
|
|
|
- ""
|
|
|
|
resources:
|
|
|
|
- pods
|
|
|
|
- pods/log
|
|
|
|
verbs:
|
|
|
|
- get
|
|
|
|
{{- if eq (toString (index (coalesce .Values.server.config .Values.configs.cm) "exec.enabled")) "true" }}
|
|
|
|
- apiGroups:
|
|
|
|
- ""
|
|
|
|
resources:
|
|
|
|
- pods/exec
|
|
|
|
verbs:
|
|
|
|
- create
|
|
|
|
{{- end }}
|
|
|
|
- apiGroups:
|
|
|
|
- argoproj.io
|
|
|
|
resources:
|
|
|
|
- applications
|
2023-11-06 14:48:59 +00:00
|
|
|
- applicationsets
|
2022-11-07 19:20:03 +00:00
|
|
|
verbs:
|
|
|
|
- get
|
|
|
|
- list
|
|
|
|
- update
|
|
|
|
- watch
|
2023-08-11 18:32:44 +00:00
|
|
|
- apiGroups:
|
|
|
|
- batch
|
|
|
|
resources:
|
2023-09-15 16:00:18 +00:00
|
|
|
{{/* supports triggering jobs from UI */}}
|
2023-08-11 18:32:44 +00:00
|
|
|
- jobs
|
|
|
|
verbs:
|
|
|
|
- create
|
|
|
|
- apiGroups:
|
|
|
|
- argoproj.io
|
|
|
|
resources:
|
|
|
|
- workflows
|
|
|
|
verbs:
|
2023-09-15 16:00:18 +00:00
|
|
|
{{/* supports triggering workflows from UI */}}
|
2023-08-11 18:32:44 +00:00
|
|
|
- create
|
2022-11-07 19:20:03 +00:00
|
|
|
{{- end }}
|