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>
This commit is contained in:
parent
c7584ab51d
commit
6452b6a2e9
6 changed files with 61 additions and 6 deletions
23
charts/argo-cd/templates/argocd-repo-server/clusterrole.yaml
Normal file
23
charts/argo-cd/templates/argocd-repo-server/clusterrole.yaml
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
{{- 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 }}
|
||||
Loading…
Add table
Add a link
Reference in a new issue