From b4d2be51bcc524dd2f44a471a4e949a90a9fb502 Mon Sep 17 00:00:00 2001 From: Alexandre Gaudreault Date: Thu, 25 Aug 2022 17:39:04 -0400 Subject: [PATCH] fix(argo-cd): invalid yaml with topologySpreadConstraints (#1423) * fix(argo-cd): invalid yaml with topologySpreadConstraints Signed-off-by: Alexandre Gaudreault * add missing end * Update Chart.yaml * Apply changes from code review Signed-off-by: Marco Kilchhofer Signed-off-by: Alexandre Gaudreault Signed-off-by: Marco Kilchhofer Co-authored-by: Marco Kilchhofer --- charts/argo-cd/Chart.yaml | 4 ++-- .../argocd-application-controller/statefulset.yaml | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/charts/argo-cd/Chart.yaml b/charts/argo-cd/Chart.yaml index e3f0acf7..3653c15e 100644 --- a/charts/argo-cd/Chart.yaml +++ b/charts/argo-cd/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 appVersion: v2.4.11 description: A Helm chart for Argo CD, a declarative, GitOps continuous delivery tool for Kubernetes. name: argo-cd -version: 5.3.1 +version: 5.3.2 home: https://github.com/argoproj/argo-helm icon: https://argo-cd.readthedocs.io/en/stable/assets/logo.png keywords: @@ -21,4 +21,4 @@ dependencies: condition: redis-ha.enabled annotations: artifacthub.io/changes: | - - "[Changed]: Env variable ARGOCD_CONTROLLER_REPLICAS is now automatically set by replica count" + - "[Fixed]: Invalid yaml for controller topologySpreadConstraints" diff --git a/charts/argo-cd/templates/argocd-application-controller/statefulset.yaml b/charts/argo-cd/templates/argocd-application-controller/statefulset.yaml index e5442d0f..12379771 100755 --- a/charts/argo-cd/templates/argocd-application-controller/statefulset.yaml +++ b/charts/argo-cd/templates/argocd-application-controller/statefulset.yaml @@ -138,11 +138,11 @@ spec: {{- with .Values.controller.topologySpreadConstraints }} topologySpreadConstraints: {{- range $constraint := . }} - - {{ toYaml $constraint | nindent 8 | trim }} + - {{ toYaml $constraint | nindent 8 | trim }} {{- if not $constraint.labelSelector }} - labelSelector: - matchLabels: - {{- include "argo-cd.selectorLabels" (dict "context" $ "name" $.Values.controller.name) | nindent 12 }} + labelSelector: + matchLabels: + {{- include "argo-cd.selectorLabels" (dict "context" $ "name" $.Values.controller.name) | nindent 12 }} {{- end }} {{- end }} {{- end }}