From f2d8b4c9d09a01c48012c68d06737ab4d79683a8 Mon Sep 17 00:00:00 2001 From: Marco Kilchhofer Date: Thu, 16 Sep 2021 20:43:08 +0200 Subject: [PATCH] Apply suggestions from code review Signed-off-by: Marco Kilchhofer --- .../templates/argocd-application-controller/deployment.yaml | 6 +++--- charts/argo-cd/templates/argocd-repo-server/deployment.yaml | 6 +++--- charts/argo-cd/templates/argocd-server/deployment.yaml | 6 +++--- charts/argo-cd/templates/dex/deployment.yaml | 6 +++--- charts/argo-cd/templates/redis/deployment.yaml | 6 +++--- 5 files changed, 15 insertions(+), 15 deletions(-) diff --git a/charts/argo-cd/templates/argocd-application-controller/deployment.yaml b/charts/argo-cd/templates/argocd-application-controller/deployment.yaml index e5f3a780..8e2401f0 100755 --- a/charts/argo-cd/templates/argocd-application-controller/deployment.yaml +++ b/charts/argo-cd/templates/argocd-application-controller/deployment.yaml @@ -118,10 +118,10 @@ spec: affinity: {{- toYaml .Values.controller.affinity | nindent 8 }} {{- end }} - {{- if .Values.controller.topologySpreadConstraints }} + {{- with .Values.controller.topologySpreadConstraints }} topologySpreadConstraints: - {{- range $constraint := .Values.controller.topologySpreadConstraints }} - - {{ $constraint | toYaml | nindent 8 | trim }} + {{- range $constraint := . }} + - {{ toYaml $constraint | nindent 8 | trim }} {{- if not $constraint.labelSelector }} labelSelector: matchLabels: diff --git a/charts/argo-cd/templates/argocd-repo-server/deployment.yaml b/charts/argo-cd/templates/argocd-repo-server/deployment.yaml index eea9fcf1..01568720 100755 --- a/charts/argo-cd/templates/argocd-repo-server/deployment.yaml +++ b/charts/argo-cd/templates/argocd-repo-server/deployment.yaml @@ -126,10 +126,10 @@ spec: affinity: {{- toYaml .Values.repoServer.affinity | nindent 8 }} {{- end }} - {{- if .Values.repoServer.topologySpreadConstraints }} + {{- with .Values.repoServer.topologySpreadConstraints }} topologySpreadConstraints: - {{- range $constraint := .Values.repoServer.topologySpreadConstraints }} - - {{ $constraint | toYaml | nindent 8 | trim }} + {{- range $constraint := . }} + - {{ toYaml $constraint | nindent 8 | trim }} {{- if not $constraint.labelSelector }} labelSelector: matchLabels: diff --git a/charts/argo-cd/templates/argocd-server/deployment.yaml b/charts/argo-cd/templates/argocd-server/deployment.yaml index ae462fb9..44aef772 100755 --- a/charts/argo-cd/templates/argocd-server/deployment.yaml +++ b/charts/argo-cd/templates/argocd-server/deployment.yaml @@ -140,10 +140,10 @@ spec: affinity: {{- toYaml .Values.server.affinity | nindent 8 }} {{- end }} - {{- if .Values.server.topologySpreadConstraints }} + {{- with .Values.server.topologySpreadConstraints }} topologySpreadConstraints: - {{- range $constraint := .Values.server.topologySpreadConstraints }} - - {{ $constraint | toYaml | nindent 8 | trim }} + {{- range $constraint := . }} + - {{ toYaml $constraint | nindent 8 | trim }} {{- if not $constraint.labelSelector }} labelSelector: matchLabels: diff --git a/charts/argo-cd/templates/dex/deployment.yaml b/charts/argo-cd/templates/dex/deployment.yaml index ece969e7..7234d612 100755 --- a/charts/argo-cd/templates/dex/deployment.yaml +++ b/charts/argo-cd/templates/dex/deployment.yaml @@ -112,10 +112,10 @@ spec: affinity: {{- toYaml .Values.dex.affinity | nindent 8 }} {{- end }} - {{- if .Values.dex.topologySpreadConstraints }} + {{- with .Values.dex.topologySpreadConstraints }} topologySpreadConstraints: - {{- range $constraint := .Values.dex.topologySpreadConstraints }} - - {{ $constraint | toYaml | nindent 8 | trim }} + {{- range $constraint := . }} + - {{ toYaml $constraint | nindent 8 | trim }} {{- if not $constraint.labelSelector }} labelSelector: matchLabels: diff --git a/charts/argo-cd/templates/redis/deployment.yaml b/charts/argo-cd/templates/redis/deployment.yaml index 2e6b5954..22eccad1 100755 --- a/charts/argo-cd/templates/redis/deployment.yaml +++ b/charts/argo-cd/templates/redis/deployment.yaml @@ -76,10 +76,10 @@ spec: affinity: {{- toYaml .Values.redis.affinity | nindent 8 }} {{- end }} - {{- if .Values.redis.topologySpreadConstraints }} + {{- with .Values.redis.topologySpreadConstraints }} topologySpreadConstraints: - {{- range $constraint := .Values.redis.topologySpreadConstraints }} - - {{ $constraint | toYaml | nindent 8 | trim }} + {{- range $constraint := . }} + - {{ toYaml $constraint | nindent 8 | trim }} {{- if not $constraint.labelSelector }} labelSelector: matchLabels: