fix(argo-cd): Replace coalesce with merge for old config values (#1612)
Signed-off-by: Petr Drastil <petr.drastil@gmail.com>
This commit is contained in:
parent
82b726bab5
commit
579f11407a
4 changed files with 6 additions and 6 deletions
|
@ -3,7 +3,7 @@ appVersion: v2.5.0
|
||||||
kubeVersion: ">=1.22.0-0"
|
kubeVersion: ">=1.22.0-0"
|
||||||
description: A Helm chart for Argo CD, a declarative, GitOps continuous delivery tool for Kubernetes.
|
description: A Helm chart for Argo CD, a declarative, GitOps continuous delivery tool for Kubernetes.
|
||||||
name: argo-cd
|
name: argo-cd
|
||||||
version: 5.12.2
|
version: 5.12.3
|
||||||
home: https://github.com/argoproj/argo-helm
|
home: https://github.com/argoproj/argo-helm
|
||||||
icon: https://argo-cd.readthedocs.io/en/stable/assets/logo.png
|
icon: https://argo-cd.readthedocs.io/en/stable/assets/logo.png
|
||||||
sources:
|
sources:
|
||||||
|
@ -23,4 +23,4 @@ dependencies:
|
||||||
condition: redis-ha.enabled
|
condition: redis-ha.enabled
|
||||||
annotations:
|
annotations:
|
||||||
artifacthub.io/changes: |
|
artifacthub.io/changes: |
|
||||||
- "[Fixed]: Update network policy to fix prometheus scraping for argocd-application-controller"
|
- "[Fixed]: Merging of old configs with newly defined sections to get default values"
|
||||||
|
|
|
@ -182,7 +182,7 @@ ui.cssurl: "./custom/custom.styles.css"
|
||||||
Merge Argo Configuration with Preset Configuration
|
Merge Argo Configuration with Preset Configuration
|
||||||
*/}}
|
*/}}
|
||||||
{{- define "argo-cd.config.cm" -}}
|
{{- define "argo-cd.config.cm" -}}
|
||||||
{{- $config := coalesce .Values.server.config (omit .Values.configs.cm "create" "annotations") -}}
|
{{- $config := (mergeOverwrite (deepCopy (omit .Values.configs.cm "create" "annotations")) (.Values.server.config | default dict)) -}}
|
||||||
{{- $preset := include "argo-cd.config.cm.presets" . | fromYaml | default dict -}}
|
{{- $preset := include "argo-cd.config.cm.presets" . | fromYaml | default dict -}}
|
||||||
{{- range $key, $value := mergeOverwrite $preset $config }}
|
{{- range $key, $value := mergeOverwrite $preset $config }}
|
||||||
{{ $key }}: {{ toString $value | toYaml }}
|
{{ $key }}: {{ toString $value | toYaml }}
|
||||||
|
|
|
@ -5,7 +5,7 @@ metadata:
|
||||||
name: argocd-cm
|
name: argocd-cm
|
||||||
labels:
|
labels:
|
||||||
{{- include "argo-cd.labels" (dict "context" . "component" .Values.server.name "name" "cm") | nindent 4 }}
|
{{- include "argo-cd.labels" (dict "context" . "component" .Values.server.name "name" "cm") | nindent 4 }}
|
||||||
{{- with (coalesce .Values.server.configAnnotations .Values.configs.cm.annotations) }}
|
{{- with (mergeOverwrite (deepCopy .Values.configs.cm.annotations) (.Values.server.configAnnotations | default dict)) }}
|
||||||
annotations:
|
annotations:
|
||||||
{{- range $key, $value := . }}
|
{{- range $key, $value := . }}
|
||||||
{{ $key }}: {{ $value | quote }}
|
{{ $key }}: {{ $value | quote }}
|
||||||
|
|
|
@ -5,13 +5,13 @@ metadata:
|
||||||
name: argocd-rbac-cm
|
name: argocd-rbac-cm
|
||||||
labels:
|
labels:
|
||||||
{{- include "argo-cd.labels" (dict "context" . "component" .Values.server.name "name" "rbac-cm") | nindent 4 }}
|
{{- include "argo-cd.labels" (dict "context" . "component" .Values.server.name "name" "rbac-cm") | nindent 4 }}
|
||||||
{{- with (coalesce .Values.server.rbacConfigAnnotations .Values.configs.rbac.annotations) }}
|
{{- with (mergeOverwrite (deepCopy .Values.configs.rbac.annotations) (.Values.server.rbacConfigAnnotations | default dict)) }}
|
||||||
annotations:
|
annotations:
|
||||||
{{- range $key, $value := . }}
|
{{- range $key, $value := . }}
|
||||||
{{ $key }}: {{ $value | quote }}
|
{{ $key }}: {{ $value | quote }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- with (coalesce .Values.server.rbacConfig (omit .Values.configs.rbac "create" "annotations")) }}
|
{{- with (mergeOverwrite (deepCopy (omit .Values.configs.rbac "create" "annotations")) (.Values.server.rbacConfig | default dict)) }}
|
||||||
data:
|
data:
|
||||||
{{- toYaml . | nindent 2 }}
|
{{- toYaml . | nindent 2 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
Loading…
Reference in a new issue