fix(argo-cd): Type conversion for ConfigMaps values (#1594)

Signed-off-by: Petr Drastil <petr.drastil@gmail.com>
This commit is contained in:
Petr Drastil 2022-10-29 21:08:16 +02:00 committed by GitHub
parent 90aa8962a0
commit 3eaad42bb4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 18 additions and 16 deletions

View file

@ -58,7 +58,7 @@ In order to access the server UI you have the following options:
- Set the `configs.params."server.insecure"` in the values file and terminate SSL at your ingress: https://argo-cd.readthedocs.io/en/stable/operator-manual/ingress/#option-2-multiple-ingress-objects-and-hosts
{{ if eq (index (coalesce .Values.server.config .Values.configs.cm) "admin.enabled") "true" -}}
{{ if eq (toString (index (coalesce .Values.server.config .Values.configs.cm) "admin.enabled")) "true" -}}
After reaching the UI the first time you can login with username: admin and the random password generated during the installation. You can find the password by running:
kubectl -n {{ .Release.Namespace }} get secret argocd-initial-admin-secret -o jsonpath="{.data.password}" | base64 -d

View file

@ -184,7 +184,9 @@ Merge Argo Configuration with Preset Configuration
{{- define "argo-cd.config.cm" -}}
{{- $config := coalesce .Values.server.config (omit .Values.configs.cm "create" "annotations") -}}
{{- $preset := include "argo-cd.config.cm.presets" . | fromYaml | default dict -}}
{{- mergeOverwrite $preset $config | toYaml }}
{{- range $key, $value := mergeOverwrite $preset $config }}
{{ $key }}: {{ toString $value | toYaml }}
{{- end }}
{{- end -}}
{{/*
@ -209,8 +211,8 @@ Merge Argo Params Configuration with Preset Configuration
*/}}
{{- define "argo-cd.config.params" -}}
{{- $config := omit .Values.configs.params "annotations" }}
{{- $preset := include "argo-cd.config.params.presets" $ | fromYaml | default dict -}}
{{- $preset := include "argo-cd.config.params.presets" . | fromYaml | default dict -}}
{{- range $key, $value := mergeOverwrite $preset $config }}
{{ $key }}: {{ $value | quote }}
{{ $key }}: {{ toString $value | toYaml }}
{{- end }}
{{- end -}}

View file

@ -12,5 +12,5 @@ metadata:
{{- end }}
{{- end }}
data:
{{- include "argo-cd.config.cm" . | nindent 2 }}
{{- include "argo-cd.config.cm" . | trim | nindent 2 }}
{{- end }}

View file

@ -27,7 +27,7 @@ rules:
- pods/log
verbs:
- get
{{- if eq (index (coalesce .Values.server.config .Values.configs.cm) "exec.enabled") "true" }}
{{- if eq (toString (index (coalesce .Values.server.config .Values.configs.cm) "exec.enabled")) "true" }}
- apiGroups:
- ""
resources: