From 51e22106314012c2b4e620ad90b59340b5afb39e Mon Sep 17 00:00:00 2001
From: Petr Drastil <petr.drastil@gmail.com>
Date: Wed, 9 Aug 2023 10:19:54 +0200
Subject: [PATCH] fix(argo-cd): Fix global log level configuration (#2213)

fix(argo-cd) - Fix global log level configuration

Signed-off-by: Petr Drastil <petr.drastil@gmail.com>
---
 charts/argo-cd/Chart.yaml             | 6 +++---
 charts/argo-cd/templates/_helpers.tpl | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/charts/argo-cd/Chart.yaml b/charts/argo-cd/Chart.yaml
index f85b8bb3..6140b2cb 100644
--- a/charts/argo-cd/Chart.yaml
+++ b/charts/argo-cd/Chart.yaml
@@ -3,7 +3,7 @@ appVersion: v2.8.0
 kubeVersion: ">=1.23.0-0"
 description: A Helm chart for Argo CD, a declarative, GitOps continuous delivery tool for Kubernetes.
 name: argo-cd
-version: 5.43.0
+version: 5.43.1
 home: https://github.com/argoproj/argo-helm
 icon: https://argo-cd.readthedocs.io/en/stable/assets/logo.png
 sources:
@@ -26,5 +26,5 @@ annotations:
     fingerprint: 2B8F22F57260EFA67BE1C5824B11F800CD9D2252
     url: https://argoproj.github.io/argo-helm/pgp_keys.asc
   artifacthub.io/changes: |
-    - kind: changed
-      description: Upgrade Argo CD to 2.8.0
+    - kind: fixed
+      description: Fixed global log level configuration
diff --git a/charts/argo-cd/templates/_helpers.tpl b/charts/argo-cd/templates/_helpers.tpl
index c4c814da..05852686 100644
--- a/charts/argo-cd/templates/_helpers.tpl
+++ b/charts/argo-cd/templates/_helpers.tpl
@@ -198,7 +198,7 @@ NOTE: Configuration keys must be stored as dict because YAML treats dot as separ
 {{- end -}}
 {{- range $component := tuple "applicationsetcontroller" "controller" "server" "reposerver" -}}
 {{- $_ := set $presets (printf "%s.log.format" $component) $.Values.global.logging.format -}}
-{{- $_ := set $presets (printf "%s.log.format" $component) $.Values.global.logging.format -}}
+{{- $_ := set $presets (printf "%s.log.level" $component) $.Values.global.logging.level -}}
 {{- end -}}
 {{- if .Values.applicationSet.enabled -}}
 {{- $_ := set $presets "applicationsetcontroller.enable.leader.election" (gt (.Values.applicationSet.replicaCount | int64) 1) -}}