argocd-helm/charts/argo-cd/templates/argocd-application-controller/clusterrole.yaml
Rо́man 6452b6a2e9
feat(argo-cd): Ability to provide cluster role to repo-server (#919)
* feat(argo-cd): Ability to provide cluster role to repo-server

Signed-off-by: Roman Rudenko <3kmnazapad@gmail.com>

* custom clusterRoleRules

Signed-off-by: Roman Rudenko <3kmnazapad@gmail.com>

* chore: beautify indentation

Signed-off-by: Marco Kilchhofer <mkilchhofer@users.noreply.github.com>

* fix: noeol in clusterrolebinding.yaml

Signed-off-by: Marco Kilchhofer <mkilchhofer@users.noreply.github.com>

Co-authored-by: Roman Rudenko <roman.rudenko@telekom.com>
Co-authored-by: Marco Kilchhofer <mkilchhofer@users.noreply.github.com>
2021-09-17 22:14:31 +02:00

23 lines
598 B
YAML

{{- if .Values.controller.clusterAdminAccess.enabled }}
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: {{ template "argo-cd.controller.fullname" . }}
labels:
{{- include "argo-cd.labels" (dict "context" . "component" .Values.controller.name "name" .Values.controller.name) | nindent 4 }}
rules:
{{- if .Values.controller.clusterRoleRules.enabled }}
{{- toYaml .Values.controller.clusterRoleRules.rules | nindent 0 }}
{{- else }}
- apiGroups:
- '*'
resources:
- '*'
verbs:
- '*'
- nonResourceURLs:
- '*'
verbs:
- '*'
{{- end }}
{{- end }}