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