2024-02-07 22:40:05 +01:00
|
|
|
{{- if .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:
|
2024-04-02 07:03:37 +02:00
|
|
|
{{- if .Values.server.clusterRoleRules.enabled }}
|
|
|
|
|
{{- toYaml .Values.server.clusterRoleRules.rules | nindent 2 }}
|
|
|
|
|
{{- else }}
|
2019-05-08 09:45:37 -05:00
|
|
|
- apiGroups:
|
|
|
|
|
- '*'
|
|
|
|
|
resources:
|
|
|
|
|
- '*'
|
|
|
|
|
verbs:
|
2024-11-05 00:59:47 +01: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 09:45:37 -05:00
|
|
|
- apiGroups:
|
|
|
|
|
- ""
|
|
|
|
|
resources:
|
|
|
|
|
- events
|
|
|
|
|
verbs:
|
2024-11-05 00:59:47 +01:00
|
|
|
- list # supports listing events in UI
|
2023-11-10 21:41:09 +09:00
|
|
|
- create
|
2019-05-08 09:45:37 -05:00
|
|
|
- apiGroups:
|
|
|
|
|
- ""
|
|
|
|
|
resources:
|
|
|
|
|
- pods
|
|
|
|
|
- pods/log
|
|
|
|
|
verbs:
|
2024-11-05 00:59:47 +01:00
|
|
|
- get # supports viewing pod logs from UI
|
2024-02-07 22:40:05 +01:00
|
|
|
{{- if eq (toString (index .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
|
2024-03-29 09:13:31 +01:00
|
|
|
{{- if (index .Values.configs.params "application.namespaces") }}
|
|
|
|
|
- apiGroups:
|
|
|
|
|
- "argoproj.io"
|
|
|
|
|
resources:
|
|
|
|
|
- "applications"
|
|
|
|
|
verbs:
|
|
|
|
|
- create
|
|
|
|
|
- delete
|
|
|
|
|
- update
|
|
|
|
|
- patch
|
|
|
|
|
{{- end }}
|
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
|
2024-04-02 07:03:37 +02:00
|
|
|
{{- end }}
|
2022-06-14 14:31:39 +02:00
|
|
|
{{- end }}
|