fix(argocd): Adds argocd-server ClusterRole and ClusterRoleBinding

Adding the ClusterRole and ClusterRoleBinding allows argocd-server
to
read the necessary resources to deploy applications
to the default
cluster.

Closes #61
This commit is contained in:
Dennis Webb 2019-05-06 09:23:10 -05:00
parent 8e324206f8
commit f7bc411b81
No known key found for this signature in database
GPG key ID: 483DD7C0E2E23E93
2 changed files with 56 additions and 0 deletions

View file

@ -0,0 +1,35 @@
{{- if .Values.clusterAdminAccess.enabled }}
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: argocd-server
labels:
app.kubernetes.io/name: {{ include "argo-cd.name" . }}-server
helm.sh/chart: {{ include "argo-cd.chart" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
app.kubernetes.io/part-of: {{ include "argo-cd.name" . }}
app.kubernetes.io/component: server
rules:
- apiGroups:
- '*'
resources:
- '*'
verbs:
- delete
- get
- patch
- apiGroups:
- ""
resources:
- events
verbs:
- list
- apiGroups:
- ""
resources:
- pods
- pods/log
verbs:
- get
{{- end }}

View file

@ -0,0 +1,21 @@
{{- if .Values.clusterAdminAccess.enabled }}
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: argocd-server
labels:
app.kubernetes.io/name: {{ include "argo-cd.name" . }}-server
helm.sh/chart: {{ include "argo-cd.chart" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
app.kubernetes.io/part-of: {{ include "argo-cd.name" . }}
app.kubernetes.io/component: server
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: argocd-server
subjects:
- kind: ServiceAccount
name: argocd-server
namespace: {{ .Release.Namespace }}
{{- end -}}