Added Role and service account to repo-server
This commit is contained in:
parent
361ea8d13d
commit
ef04e70c7b
6 changed files with 72 additions and 0 deletions
|
@ -92,6 +92,17 @@ Create the name of the ArgoCD server service account to use
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Create the name of the controller service account to use
|
||||||
|
*/}}
|
||||||
|
{{- define "argo-cd.repoServerServiceAccountName" -}}
|
||||||
|
{{- if .Values.repoServer.serviceAccount.create -}}
|
||||||
|
{{ default (include "argo-cd.fullname" .) .Values.repoServer.serviceAccount.name }}
|
||||||
|
{{- else -}}
|
||||||
|
{{ default "default" .Values.repoServer.serviceAccount.name }}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
{{/*
|
{{/*
|
||||||
Create chart name and version as used by the chart label.
|
Create chart name and version as used by the chart label.
|
||||||
*/}}
|
*/}}
|
||||||
|
|
|
@ -105,6 +105,7 @@ spec:
|
||||||
affinity:
|
affinity:
|
||||||
{{- toYaml .Values.repoServer.affinity | nindent 8 }}
|
{{- toYaml .Values.repoServer.affinity | nindent 8 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
serviceAccountName: {{ template "argo-cd.repoServerServiceAccountName" . }}
|
||||||
volumes:
|
volumes:
|
||||||
{{- if .Values.repoServer.volumes }}
|
{{- if .Values.repoServer.volumes }}
|
||||||
{{- toYaml .Values.repoServer.volumes | nindent 8}}
|
{{- toYaml .Values.repoServer.volumes | nindent 8}}
|
||||||
|
|
15
charts/argo-cd/templates/argocd-repo-server/role.yaml
Normal file
15
charts/argo-cd/templates/argocd-repo-server/role.yaml
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
kind: Role
|
||||||
|
metadata:
|
||||||
|
name: {{ template "argo-cd.repoServer.fullname" . }}
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: {{ include "argo-cd.name" . }}-{{ .Values.repoServer.name }}
|
||||||
|
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: argocd
|
||||||
|
app.kubernetes.io/component: {{ .Values.repoServer.name }}
|
||||||
|
rules:
|
||||||
|
{{- if .Values.repoServer.rbac }}
|
||||||
|
{{toYaml .Values.repoServer.rbac }}
|
||||||
|
{{- end }}
|
19
charts/argo-cd/templates/argocd-repo-server/rolebinding.yaml
Normal file
19
charts/argo-cd/templates/argocd-repo-server/rolebinding.yaml
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
kind: RoleBinding
|
||||||
|
metadata:
|
||||||
|
name: {{ template "argo-cd.repoServer.fullname" . }}
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: {{ include "argo-cd.name" . }}-{{ .Values.repoServer.name }}
|
||||||
|
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: argocd
|
||||||
|
app.kubernetes.io/component: {{ .Values.repoServer.name }}
|
||||||
|
roleRef:
|
||||||
|
apiGroup: rbac.authorization.k8s.io
|
||||||
|
kind: Role
|
||||||
|
name: {{ template "argo-cd.repoServer.fullname" . }}
|
||||||
|
subjects:
|
||||||
|
- kind: ServiceAccount
|
||||||
|
name: {{ template "argo-cd.repoServerServiceAccountName" . }}
|
||||||
|
namespace: {{ .Release.Namespace }}
|
|
@ -0,0 +1,11 @@
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ServiceAccount
|
||||||
|
metadata:
|
||||||
|
name: {{ template "argo-cd.repoServerServiceAccountName" . }}
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: {{ include "argo-cd.name" . }}-{{ .Values.repoServer.name }}
|
||||||
|
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: argocd
|
||||||
|
app.kubernetes.io/component: {{ .Values.repoServer.name }}
|
|
@ -478,6 +478,21 @@ repoServer:
|
||||||
# namespace: monitoring
|
# namespace: monitoring
|
||||||
# additionalLabels: {}
|
# additionalLabels: {}
|
||||||
|
|
||||||
|
serviceAccount:
|
||||||
|
create: true
|
||||||
|
name: argocd-repo-server
|
||||||
|
|
||||||
|
## Repo server rbac rules
|
||||||
|
#rbac:
|
||||||
|
#- apiGroups:
|
||||||
|
# - argoproj.io
|
||||||
|
# resources:
|
||||||
|
# - applications
|
||||||
|
# verbs:
|
||||||
|
# - get
|
||||||
|
# - list
|
||||||
|
# - watch
|
||||||
|
|
||||||
## Argo Configs
|
## Argo Configs
|
||||||
configs:
|
configs:
|
||||||
knownHosts:
|
knownHosts:
|
||||||
|
|
Loading…
Reference in a new issue