Conditionally create the RBAC configmap

Signed-off-by: John Kost <jkost@bandwidth.com>
This commit is contained in:
John Kost 2021-02-08 21:11:30 -05:00
parent ba467c8a4b
commit e063e6a3e7
2 changed files with 11 additions and 1 deletions

View file

@ -1,7 +1,8 @@
{{- if .Values.server.rbacConfigMapEnabled }}
apiVersion: v1
kind: ConfigMap
metadata:
name: argocd-rbac-cm
name: {{ .Values.server.rbacConfigMapName }}
labels:
app.kubernetes.io/name: {{ include "argo-cd.name" . }}-rbac-cm
helm.sh/chart: {{ include "argo-cd.chart" . }}
@ -18,4 +19,5 @@ metadata:
{{- if .Values.server.rbacConfig }}
data:
{{- toYaml .Values.server.rbacConfig | nindent 4 }}
{{- end }}
{{- end }}

View file

@ -595,6 +595,14 @@ server:
## Annotations to be added to ArgoCD rbac ConfigMap
rbacConfigAnnotations: {}
# Name of the configmap used for the RBAC config. Must be set to `argocd-rbac-cm` as the values are hardcoded in
# ArgoCD. See https://github.com/argoproj/argo-cd/blob/master/common/common.go
rbacConfigMapName: "argocd-rbac-cm"
# Boolean determining whether or not to create the configmap. If false, it is expected tthe configmap will be created
# by something else. ArgoCD will not work if there is no configMap created with the name above.
rbacConfigMapEnabled: true
## Not well tested and not well supported on release v1.0.0.
## Applications
## reference: https://github.com/argoproj/argo-cd/blob/master/docs/operator-manual/