Enable cluster admin accessby default

Default installation will allow installing apps in the current cluster without
inputted credentials. For other clusters inputted credentials will be needed
This commit is contained in:
Liviu Costea 2019-02-02 09:03:05 +02:00
parent 42faa9967b
commit 2d1905c807
3 changed files with 53 additions and 0 deletions

View file

@ -0,0 +1,24 @@
{{- if .Values.clusterAdminAccess.enabled }}
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: {{ include "argo-cd.fullname" . }}-application-controller
labels:
app.kubernetes.io/name: {{ include "argo-cd.name" . }}-application-controller
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: application-controller
rules:
- apiGroups:
- '*'
resources:
- '*'
verbs:
- '*'
- nonResourceURLs:
- '*'
verbs:
- '*'
{{- end }}

View file

@ -0,0 +1,21 @@
{{- if .Values.clusterAdminAccess.enabled }}
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: {{ include "argo-cd.fullname" . }}-application-controller
labels:
app.kubernetes.io/name: {{ include "argo-cd.name" . }}-application-controller
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: application-controller
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: {{ include "argo-cd.fullname" . }}-application-controller
subjects:
- kind: ServiceAccount
name: {{ include "argo-cd.fullname" . }}-application-controller
namespace: {{ .Release.Namespace }}
{{- end -}} }}

View file

@ -29,6 +29,14 @@ repoServer:
tag: v0.11.0 tag: v0.11.0
pullPolicy: Always pullPolicy: Always
# Standard Argo CD installation with cluster-admin access.
# Set this true if you plan to use Argo CD to deploy applications in the same cluster that
# Argo CD runs in (i.e. kubernetes.svc.default).
# Will still be able to deploy to external clusters with inputted credentials.
clusterAdminAccess:
enabled: true
config: config:
helmRepositories: helmRepositories:
- name: privateRepo - name: privateRepo