2023-01-10 09:58:45 +01:00
|
|
|
{{- $config := .Values.server.clusterAdminAccess | default dict -}}
|
|
|
|
|
{{- if hasKey $config "enabled" | ternary $config.enabled .Values.createClusterRoles }}
|
2019-05-08 09:45:37 -05:00
|
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
|
|
|
kind: ClusterRole
|
|
|
|
|
metadata:
|
2022-10-25 23:22:22 +02:00
|
|
|
name: {{ include "argo-cd.server.fullname" . }}
|
2019-05-08 09:45:37 -05:00
|
|
|
labels:
|
2021-03-22 21:15:37 +01:00
|
|
|
{{- include "argo-cd.labels" (dict "context" . "component" .Values.server.name "name" .Values.server.name) | nindent 4 }}
|
2019-05-08 09:45:37 -05:00
|
|
|
rules:
|
|
|
|
|
- apiGroups:
|
|
|
|
|
- '*'
|
|
|
|
|
resources:
|
|
|
|
|
- '*'
|
|
|
|
|
verbs:
|
|
|
|
|
- delete
|
|
|
|
|
- get
|
|
|
|
|
- patch
|
|
|
|
|
- apiGroups:
|
|
|
|
|
- ""
|
|
|
|
|
resources:
|
|
|
|
|
- events
|
|
|
|
|
verbs:
|
|
|
|
|
- list
|
2023-11-10 21:41:09 +09:00
|
|
|
{{- if (index .Values.configs.params "application.namespaces") }}
|
|
|
|
|
- create
|
|
|
|
|
{{- end }}
|
2019-05-08 09:45:37 -05:00
|
|
|
- apiGroups:
|
|
|
|
|
- ""
|
|
|
|
|
resources:
|
|
|
|
|
- pods
|
|
|
|
|
- pods/log
|
|
|
|
|
verbs:
|
2020-02-17 06:49:52 +08:00
|
|
|
- get
|
2022-10-29 21:08:16 +02:00
|
|
|
{{- if eq (toString (index (coalesce .Values.server.config .Values.configs.cm) "exec.enabled")) "true" }}
|
2022-06-14 14:31:39 +02:00
|
|
|
- apiGroups:
|
2022-10-25 23:22:22 +02:00
|
|
|
- ""
|
2022-06-14 14:31:39 +02:00
|
|
|
resources:
|
2022-10-25 23:22:22 +02:00
|
|
|
- pods/exec
|
2022-06-14 14:31:39 +02:00
|
|
|
verbs:
|
2022-10-25 23:22:22 +02:00
|
|
|
- create
|
2022-06-14 14:31:39 +02:00
|
|
|
{{- end }}
|
2022-10-25 23:22:22 +02:00
|
|
|
- apiGroups:
|
|
|
|
|
- argoproj.io
|
|
|
|
|
resources:
|
|
|
|
|
- applications
|
2023-11-06 13:54:34 +01:00
|
|
|
- applicationsets
|
2022-10-25 23:22:22 +02:00
|
|
|
verbs:
|
|
|
|
|
- get
|
|
|
|
|
- list
|
2022-11-06 23:13:13 +02:00
|
|
|
- update
|
2022-10-25 23:22:22 +02:00
|
|
|
- watch
|
2023-08-10 00:18:37 +02:00
|
|
|
- apiGroups:
|
|
|
|
|
- batch
|
|
|
|
|
resources:
|
2023-09-14 13:33:34 +09:00
|
|
|
{{/* supports triggering jobs from UI */}}
|
2023-08-10 00:18:37 +02:00
|
|
|
- jobs
|
|
|
|
|
verbs:
|
|
|
|
|
- create
|
|
|
|
|
- apiGroups:
|
|
|
|
|
- argoproj.io
|
|
|
|
|
resources:
|
|
|
|
|
- workflows
|
|
|
|
|
verbs:
|
2023-09-14 13:33:34 +09:00
|
|
|
{{/* supports triggering workflows from UI */}}
|
2023-08-10 00:18:37 +02:00
|
|
|
- create
|
2022-06-14 14:31:39 +02:00
|
|
|
{{- end }}
|