From 54b6a57d3fec885c4a7e7116df4375a30a972ae6 Mon Sep 17 00:00:00 2001 From: Mikhail Zholobov Date: Mon, 31 Mar 2025 22:39:17 +0200 Subject: [PATCH] fix(argo-cd): Deprecate logLevel and logFormat values for dex and notifications controller (#3209) * fix(argo-cd): Deprecate logLevel and logFormat values for dex and notifications controller These are deprecated in favor of corresponding settings in `config.params`, to match with the official docs: https://argo-cd.readthedocs.io/en/stable/operator-manual/argocd-cmd-params-cm-yaml/ The same changes were previously done for all other components much earlier in https://github.com/argoproj/argo-helm/pull/1267 and then these params were removed in https://github.com/argoproj/argo-helm/pull/2407 Signed-off-by: Mikhail Zholobov * chore(argo-cd): Bump argo-cd chart version Signed-off-by: Mikhail Zholobov --------- Signed-off-by: Mikhail Zholobov --- charts/argo-cd/Chart.yaml | 14 +++++++++++--- charts/argo-cd/README.md | 4 ---- charts/argo-cd/templates/NOTES.txt | 12 ++++++++++++ charts/argo-cd/templates/_helpers.tpl | 2 +- .../templates/argocd-notifications/deployment.yaml | 8 ++++++-- charts/argo-cd/templates/dex/deployment.yaml | 8 ++++++-- charts/argo-cd/values.yaml | 10 ++++++---- 7 files changed, 42 insertions(+), 16 deletions(-) diff --git a/charts/argo-cd/Chart.yaml b/charts/argo-cd/Chart.yaml index 0b58f56f..1f434128 100644 --- a/charts/argo-cd/Chart.yaml +++ b/charts/argo-cd/Chart.yaml @@ -3,7 +3,7 @@ appVersion: v2.14.8 kubeVersion: ">=1.25.0-0" description: A Helm chart for Argo CD, a declarative, GitOps continuous delivery tool for Kubernetes. name: argo-cd -version: 7.8.15 +version: 7.8.16 home: https://github.com/argoproj/argo-helm icon: https://argo-cd.readthedocs.io/en/stable/assets/logo.png sources: @@ -26,5 +26,13 @@ annotations: fingerprint: 2B8F22F57260EFA67BE1C5824B11F800CD9D2252 url: https://argoproj.github.io/argo-helm/pgp_keys.asc artifacthub.io/changes: | - - kind: changed - description: Upgrade redis-ha + - kind: fixed + description: Fixed the log level and log format override for components "dexserver" and "notificationscontroller" + - kind: deprecated + description: Value `notifications.logLevel` is depreacted in favor of `configs.params."notificationscontroller.log.level"` + - kind: deprecated + description: Value `notifications.logFormat` is depreacted in favor of `configs.params."notificationscontroller.log.format"` + - kind: deprecated + description: Value `dex.logLevel` is depreacted in favor of `configs.params."dexserver.log.level"` + - kind: deprecated + description: Value `dex.logFormat` is depreacted in favor of `configs.params."dexserver.log.format"` diff --git a/charts/argo-cd/README.md b/charts/argo-cd/README.md index c3af2b45..dd3ff884 100644 --- a/charts/argo-cd/README.md +++ b/charts/argo-cd/README.md @@ -1189,8 +1189,6 @@ NOTE: Any values you put under `.Values.configs.cm` are passed to argocd-cm Conf | dex.livenessProbe.periodSeconds | int | `10` | How often (in seconds) to perform the [probe] | | dex.livenessProbe.successThreshold | int | `1` | Minimum consecutive successes for the [probe] to be considered successful after having failed | | dex.livenessProbe.timeoutSeconds | int | `1` | Number of seconds after which the [probe] times out | -| dex.logFormat | string | `""` (defaults to global.logging.format) | Dex log format. Either `text` or `json` | -| dex.logLevel | string | `""` (defaults to global.logging.level) | Dex log level. One of: `debug`, `info`, `warn`, `error` | | dex.metrics.enabled | bool | `false` | Deploy metrics service | | dex.metrics.service.annotations | object | `{}` | Metrics service annotations | | dex.metrics.service.labels | object | `{}` | Metrics service labels | @@ -1570,8 +1568,6 @@ If you use an External Redis (See Option 3 above), this Job is not deployed. | notifications.livenessProbe.periodSeconds | int | `10` | How often (in seconds) to perform the [probe] | | notifications.livenessProbe.successThreshold | int | `1` | Minimum consecutive successes for the [probe] to be considered successful after having failed | | notifications.livenessProbe.timeoutSeconds | int | `1` | Number of seconds after which the [probe] times out | -| notifications.logFormat | string | `""` (defaults to global.logging.format) | Notifications controller log format. Either `text` or `json` | -| notifications.logLevel | string | `""` (defaults to global.logging.level) | Notifications controller log level. One of: `debug`, `info`, `warn`, `error` | | notifications.metrics.enabled | bool | `false` | Enables prometheus metrics server | | notifications.metrics.port | int | `9001` | Metrics port | | notifications.metrics.service.annotations | object | `{}` | Metrics service annotations | diff --git a/charts/argo-cd/templates/NOTES.txt b/charts/argo-cd/templates/NOTES.txt index 8821ab75..78c38b4b 100644 --- a/charts/argo-cd/templates/NOTES.txt +++ b/charts/argo-cd/templates/NOTES.txt @@ -1,3 +1,15 @@ +{{- if .Values.notifications.logLevel }} +DEPRECATED option notifications.logLevel - Use `configs.params."notificationscontroller.log.level"` +{{- end }} +{{- if .Values.notifications.logFormat }} +DEPRECATED option notifications.logFormat - Use `configs.params."notificationscontroller.log.format"` +{{- end }} +{{- if .Values.dex.logLevel }} +DEPRECATED option dex.logLevel - Use `configs.params."dexserver.log.level"` +{{- end }} +{{- if .Values.dex.logFormat }} +DEPRECATED option dex.logFormat - Use `configs.params."dexserver.log.format"` +{{- end }} In order to access the server UI you have the following options: 1. kubectl port-forward service/{{ include "argo-cd.fullname" . }}-server -n {{ include "argo-cd.namespace" . }} 8080:443 diff --git a/charts/argo-cd/templates/_helpers.tpl b/charts/argo-cd/templates/_helpers.tpl index aeaf3df8..5aecb5fd 100644 --- a/charts/argo-cd/templates/_helpers.tpl +++ b/charts/argo-cd/templates/_helpers.tpl @@ -238,7 +238,7 @@ NOTE: Configuration keys must be stored as dict because YAML treats dot as separ {{- $_ := set $presets "server.dex.server" (include "argo-cd.dex.server" .) -}} {{- $_ := set $presets "server.dex.server.strict.tls" .Values.dex.certificateSecret.enabled -}} {{- end -}} -{{- range $component := tuple "applicationsetcontroller" "controller" "server" "reposerver" -}} +{{- range $component := tuple "applicationsetcontroller" "controller" "server" "reposerver" "notificationscontroller" "dexserver" -}} {{- $_ := set $presets (printf "%s.log.format" $component) $.Values.global.logging.format -}} {{- $_ := set $presets (printf "%s.log.level" $component) $.Values.global.logging.level -}} {{- end -}} diff --git a/charts/argo-cd/templates/argocd-notifications/deployment.yaml b/charts/argo-cd/templates/argocd-notifications/deployment.yaml index cee627d5..6e5b96d5 100644 --- a/charts/argo-cd/templates/argocd-notifications/deployment.yaml +++ b/charts/argo-cd/templates/argocd-notifications/deployment.yaml @@ -66,11 +66,15 @@ spec: args: - /usr/local/bin/argocd-notifications - --metrics-port={{ .Values.notifications.containerPorts.metrics }} - - --loglevel={{ default .Values.global.logging.level .Values.notifications.logLevel }} - - --logformat={{ default .Values.global.logging.format .Values.notifications.logFormat }} - --namespace={{ include "argo-cd.namespace" . }} - --argocd-repo-server={{ template "argo-cd.repoServer.fullname" . }}:{{ .Values.repoServer.service.port }} - --secret-name={{ .Values.notifications.secret.name }} + {{- with .Values.notifications.logLevel }} + - --loglevel={{ . | quote }} + {{- end }} + {{- with .Values.notifications.logFormat }} + - --logformat={{ . | quote }} + {{- end }} {{- range .Values.notifications.extraArgs }} - {{ . | squote }} {{- end }} diff --git a/charts/argo-cd/templates/dex/deployment.yaml b/charts/argo-cd/templates/dex/deployment.yaml index 4c6209ad..2c910410 100755 --- a/charts/argo-cd/templates/dex/deployment.yaml +++ b/charts/argo-cd/templates/dex/deployment.yaml @@ -72,8 +72,12 @@ spec: imagePullPolicy: {{ default .Values.global.image.imagePullPolicy .Values.dex.image.imagePullPolicy }} command: - /shared/argocd-dex - - --logformat={{ default .Values.global.logging.format .Values.dex.logFormat }} - - --loglevel={{ default .Values.global.logging.level .Values.dex.logLevel }} + {{- with .Values.dex.logLevel }} + - --loglevel={{ . | quote }} + {{- end }} + {{- with .Values.dex.logFormat }} + - --logformat={{ . | quote }} + {{- end }} args: - rundex {{- with .Values.dex.extraArgs }} diff --git a/charts/argo-cd/values.yaml b/charts/argo-cd/values.yaml index 59f3e21d..f8818830 100644 --- a/charts/argo-cd/values.yaml +++ b/charts/argo-cd/values.yaml @@ -1252,12 +1252,13 @@ dex: # maxSurge: 25% # maxUnavailable: 25% + # DEPRECATED - Use configs.params to override # -- Dex log format. Either `text` or `json` # @default -- `""` (defaults to global.logging.format) - logFormat: "" + # logFormat: "" # -- Dex log level. One of: `debug`, `info`, `warn`, `error` # @default -- `""` (defaults to global.logging.level) - logLevel: "" + # logLevel: "" ## Redis redis: @@ -3236,12 +3237,13 @@ notifications: # @default -- `[]` (defaults to global.imagePullSecrets) imagePullSecrets: [] + # DEPRECATED - Use configs.params to override # -- Notifications controller log format. Either `text` or `json` # @default -- `""` (defaults to global.logging.format) - logFormat: "" + # logFormat: "" # -- Notifications controller log level. One of: `debug`, `info`, `warn`, `error` # @default -- `""` (defaults to global.logging.level) - logLevel: "" + # logLevel: "" # -- Extra arguments to provide to the notifications controller extraArgs: []