argocd-helm/charts/argo-cd/templates/argocd-configs/argocd-rbac-cm.yaml
Petr Drastil 90aa8962a0
fix(argo-cd): Fix migration path for server configs (#1585)
Signed-off-by: Petr Drastil <petr.drastil@gmail.com>
2022-10-29 11:23:40 +02:00

18 lines
681 B
YAML

{{- if (hasKey .Values.server "rbacConfigCreate") | ternary .Values.server.rbacConfigCreate .Values.configs.rbac.create }}
apiVersion: v1
kind: ConfigMap
metadata:
name: argocd-rbac-cm
labels:
{{- include "argo-cd.labels" (dict "context" . "component" .Values.server.name "name" "rbac-cm") | nindent 4 }}
{{- with (coalesce .Values.server.rbacConfigAnnotations .Values.configs.rbac.annotations) }}
annotations:
{{- range $key, $value := . }}
{{ $key }}: {{ $value | quote }}
{{- end }}
{{- end }}
{{- with (coalesce .Values.server.rbacConfig (omit .Values.configs.rbac "create" "annotations")) }}
data:
{{- toYaml . | nindent 2 }}
{{- end }}
{{- end }}