From a801d55710a704b1c155f4c146e6ead6a546d8e7 Mon Sep 17 00:00:00 2001 From: keiSunagawa Date: Wed, 15 Sep 2021 19:30:54 +0900 Subject: [PATCH] fix(argo-cd): global podLabels/podAnnotations object unexpected merge (#930) * fix(argo-cd): global podLabels/podAnnotations object unexpected merge Signed-off-by: keiSunagawa * fix change log typo Signed-off-by: keiSunagawa --- charts/argo-cd/Chart.yaml | 4 ++-- .../templates/argocd-application-controller/deployment.yaml | 4 ++-- charts/argo-cd/templates/argocd-repo-server/deployment.yaml | 4 ++-- charts/argo-cd/templates/argocd-server/deployment.yaml | 4 ++-- charts/argo-cd/templates/dex/deployment.yaml | 4 ++-- charts/argo-cd/templates/redis/deployment.yaml | 4 ++-- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/charts/argo-cd/Chart.yaml b/charts/argo-cd/Chart.yaml index 58cd634e..d52a3863 100644 --- a/charts/argo-cd/Chart.yaml +++ b/charts/argo-cd/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 appVersion: 2.1.2 description: A Helm chart for ArgoCD, a declarative, GitOps continuous delivery tool for Kubernetes. name: argo-cd -version: 3.17.6 +version: 3.17.7 home: https://github.com/argoproj/argo-helm icon: https://argoproj.github.io/argo-cd/assets/logo.png keywords: @@ -21,4 +21,4 @@ dependencies: condition: redis-ha.enabled annotations: artifacthub.io/changes: | - - "[Changed]: Upgrade argocd to 2.1.2" + - "[Fixed]: global podLabels/podAnnotations object unexpected merge" diff --git a/charts/argo-cd/templates/argocd-application-controller/deployment.yaml b/charts/argo-cd/templates/argocd-application-controller/deployment.yaml index a75c1af1..b188892b 100755 --- a/charts/argo-cd/templates/argocd-application-controller/deployment.yaml +++ b/charts/argo-cd/templates/argocd-application-controller/deployment.yaml @@ -17,14 +17,14 @@ spec: replicas: {{ .Values.controller.replicas }} template: metadata: - {{- with (mergeOverwrite .Values.global.podAnnotations .Values.controller.podAnnotations) }} + {{- with (mergeOverwrite (deepCopy .Values.global.podAnnotations) .Values.controller.podAnnotations) }} annotations: {{- toYaml . | nindent 8 }} {{- end }} labels: {{- include "argo-cd.labels" (dict "context" . "component" .Values.controller.name "name" .Values.controller.name) | nindent 8 }} app.kubernetes.io/version: {{ default .Values.global.image.tag .Values.controller.image.tag | quote }} - {{- with (mergeOverwrite .Values.global.podLabels .Values.controller.podLabels) }} + {{- with (mergeOverwrite (deepCopy .Values.global.podLabels) .Values.controller.podLabels) }} {{- toYaml . | nindent 8 }} {{- end }} spec: diff --git a/charts/argo-cd/templates/argocd-repo-server/deployment.yaml b/charts/argo-cd/templates/argocd-repo-server/deployment.yaml index 9b4c3400..07553973 100755 --- a/charts/argo-cd/templates/argocd-repo-server/deployment.yaml +++ b/charts/argo-cd/templates/argocd-repo-server/deployment.yaml @@ -16,14 +16,14 @@ spec: {{- end }} template: metadata: - {{- with (mergeOverwrite .Values.global.podAnnotations .Values.repoServer.podAnnotations) }} + {{- with (mergeOverwrite (deepCopy .Values.global.podAnnotations) .Values.repoServer.podAnnotations) }} annotations: {{- toYaml . | nindent 8 }} {{- end }} labels: {{- include "argo-cd.labels" (dict "context" . "component" .Values.repoServer.name "name" .Values.repoServer.name) | nindent 8 }} app.kubernetes.io/version: {{ default .Values.global.image.tag .Values.repoServer.image.tag | quote }} - {{- with (mergeOverwrite .Values.global.podLabels .Values.repoServer.podLabels) }} + {{- with (mergeOverwrite (deepCopy .Values.global.podLabels) .Values.repoServer.podLabels) }} {{- toYaml . | nindent 8 }} {{- end }} spec: diff --git a/charts/argo-cd/templates/argocd-server/deployment.yaml b/charts/argo-cd/templates/argocd-server/deployment.yaml index 05d1a5ae..cbb31207 100755 --- a/charts/argo-cd/templates/argocd-server/deployment.yaml +++ b/charts/argo-cd/templates/argocd-server/deployment.yaml @@ -16,14 +16,14 @@ spec: {{- end }} template: metadata: - {{- with (mergeOverwrite .Values.global.podAnnotations .Values.server.podAnnotations) }} + {{- with (mergeOverwrite (deepCopy .Values.global.podAnnotations) .Values.server.podAnnotations) }} annotations: {{- toYaml . | nindent 8 }} {{- end }} labels: {{- include "argo-cd.labels" (dict "context" . "component" .Values.server.name "name" .Values.server.name) | nindent 8 }} app.kubernetes.io/version: {{ default .Values.global.image.tag .Values.server.image.tag | quote }} - {{- with (mergeOverwrite .Values.global.podLabels .Values.server.podLabels) }} + {{- with (mergeOverwrite (deepCopy .Values.global.podLabels) .Values.server.podLabels) }} {{- toYaml . | nindent 8 }} {{- end }} spec: diff --git a/charts/argo-cd/templates/dex/deployment.yaml b/charts/argo-cd/templates/dex/deployment.yaml index 97951d01..6eb0281b 100755 --- a/charts/argo-cd/templates/dex/deployment.yaml +++ b/charts/argo-cd/templates/dex/deployment.yaml @@ -12,14 +12,14 @@ spec: {{- include "argo-cd.selectorLabels" (dict "context" . "name" .Values.dex.name) | nindent 6 }} template: metadata: - {{- with (mergeOverwrite .Values.global.podAnnotations .Values.dex.podAnnotations) }} + {{- with (mergeOverwrite (deepCopy .Values.global.podAnnotations) .Values.dex.podAnnotations) }} annotations: {{- toYaml . | nindent 8 }} {{- end }} labels: {{- include "argo-cd.labels" (dict "context" . "component" .Values.dex.name "name" .Values.dex.name) | nindent 8 }} app.kubernetes.io/version: {{ .Values.dex.image.tag | quote }} - {{- with (mergeOverwrite .Values.global.podLabels .Values.dex.podLabels) }} + {{- with (mergeOverwrite (deepCopy .Values.global.podLabels) .Values.dex.podLabels) }} {{- toYaml . | nindent 8 }} {{- end }} spec: diff --git a/charts/argo-cd/templates/redis/deployment.yaml b/charts/argo-cd/templates/redis/deployment.yaml index 05d9f43d..9ad7d662 100755 --- a/charts/argo-cd/templates/redis/deployment.yaml +++ b/charts/argo-cd/templates/redis/deployment.yaml @@ -13,14 +13,14 @@ spec: app.kubernetes.io/name: {{ include "argo-cd.name" . }}-{{ .Values.redis.name }} template: metadata: - {{- with (mergeOverwrite .Values.global.podAnnotations .Values.redis.podAnnotations) }} + {{- with (mergeOverwrite (deepCopy .Values.global.podAnnotations) .Values.redis.podAnnotations) }} annotations: {{- toYaml . | nindent 8 }} {{- end }} labels: {{- include "argo-cd.labels" (dict "context" . "component" .Values.redis.name "name" .Values.redis.name) | nindent 8 }} app.kubernetes.io/version: {{ .Values.redis.image.tag | quote }} - {{- with (mergeOverwrite .Values.global.podLabels .Values.redis.podLabels) }} + {{- with (mergeOverwrite (deepCopy .Values.global.podLabels) .Values.redis.podLabels) }} {{- toYaml . | nindent 8 }} {{- end }} spec: