2024-02-07 21:40:05 +00:00
|
|
|
{{- if .Values.createClusterRoles }}
|
2019-05-08 14:45:37 +00:00
|
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
|
|
kind: ClusterRole
|
|
|
|
metadata:
|
2022-10-25 21:22:22 +00:00
|
|
|
name: {{ include "argo-cd.server.fullname" . }}
|
2019-05-08 14:45:37 +00:00
|
|
|
labels:
|
2021-03-22 20:15:37 +00:00
|
|
|
{{- include "argo-cd.labels" (dict "context" . "component" .Values.server.name "name" .Values.server.name) | nindent 4 }}
|
2019-05-08 14:45:37 +00:00
|
|
|
rules:
|
2024-04-02 05:03:37 +00:00
|
|
|
{{- if .Values.server.clusterRoleRules.enabled }}
|
|
|
|
{{- toYaml .Values.server.clusterRoleRules.rules | nindent 2 }}
|
|
|
|
{{- else }}
|
2019-05-08 14:45:37 +00:00
|
|
|
- apiGroups:
|
|
|
|
- '*'
|
|
|
|
resources:
|
|
|
|
- '*'
|
|
|
|
verbs:
|
2024-11-04 23:59:47 +00:00
|
|
|
- delete # supports deletion a live object in UI
|
|
|
|
- get # supports viewing live object manifest in UI
|
|
|
|
- patch # supports `argocd app patch`
|
2019-05-08 14:45:37 +00:00
|
|
|
- apiGroups:
|
|
|
|
- ""
|
|
|
|
resources:
|
|
|
|
- events
|
|
|
|
verbs:
|
2024-11-04 23:59:47 +00:00
|
|
|
- list # supports listing events in UI
|
2023-11-10 12:41:09 +00:00
|
|
|
- create
|
2019-05-08 14:45:37 +00:00
|
|
|
- apiGroups:
|
|
|
|
- ""
|
|
|
|
resources:
|
|
|
|
- pods
|
|
|
|
- pods/log
|
|
|
|
verbs:
|
2024-11-04 23:59:47 +00:00
|
|
|
- get # supports viewing pod logs from UI
|
2024-02-07 21:40:05 +00:00
|
|
|
{{- if eq (toString (index .Values.configs.cm "exec.enabled")) "true" }}
|
2022-06-14 12:31:39 +00:00
|
|
|
- apiGroups:
|
2022-10-25 21:22:22 +00:00
|
|
|
- ""
|
2022-06-14 12:31:39 +00:00
|
|
|
resources:
|
2022-10-25 21:22:22 +00:00
|
|
|
- pods/exec
|
2022-06-14 12:31:39 +00:00
|
|
|
verbs:
|
2022-10-25 21:22:22 +00:00
|
|
|
- create
|
2022-06-14 12:31:39 +00:00
|
|
|
{{- end }}
|
2022-10-25 21:22:22 +00:00
|
|
|
- apiGroups:
|
|
|
|
- argoproj.io
|
|
|
|
resources:
|
|
|
|
- applications
|
2023-11-06 12:54:34 +00:00
|
|
|
- applicationsets
|
2022-10-25 21:22:22 +00:00
|
|
|
verbs:
|
|
|
|
- get
|
|
|
|
- list
|
2022-11-06 21:13:13 +00:00
|
|
|
- update
|
2022-10-25 21:22:22 +00:00
|
|
|
- watch
|
2024-03-29 08:13:31 +00:00
|
|
|
{{- if (index .Values.configs.params "application.namespaces") }}
|
|
|
|
- apiGroups:
|
|
|
|
- "argoproj.io"
|
|
|
|
resources:
|
|
|
|
- "applications"
|
|
|
|
verbs:
|
|
|
|
- create
|
|
|
|
- delete
|
|
|
|
- update
|
|
|
|
- patch
|
|
|
|
{{- end }}
|
2023-08-09 22:18:37 +00:00
|
|
|
- apiGroups:
|
|
|
|
- batch
|
|
|
|
resources:
|
2023-09-14 04:33:34 +00:00
|
|
|
{{/* supports triggering jobs from UI */}}
|
2023-08-09 22:18:37 +00:00
|
|
|
- jobs
|
|
|
|
verbs:
|
|
|
|
- create
|
|
|
|
- apiGroups:
|
|
|
|
- argoproj.io
|
|
|
|
resources:
|
|
|
|
- workflows
|
|
|
|
verbs:
|
2023-09-14 04:33:34 +00:00
|
|
|
{{/* supports triggering workflows from UI */}}
|
2023-08-09 22:18:37 +00:00
|
|
|
- create
|
2024-04-02 05:03:37 +00:00
|
|
|
{{- end }}
|
2022-06-14 12:31:39 +00:00
|
|
|
{{- end }}
|