From 3fc90b9357b018e8fc8df3d2886d2885f207d5aa Mon Sep 17 00:00:00 2001 From: mpeters0n <2matthew.peterson@gmail.com> Date: Wed, 20 Mar 2024 09:52:38 -0700 Subject: [PATCH] Fix to work with existing labels Signed-off-by: mpeters0n <2matthew.peterson@gmail.com> --- charts/argo-rollouts/templates/controller/deployment.yaml | 4 +--- charts/argo-rollouts/templates/dashboard/deployment.yaml | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/charts/argo-rollouts/templates/controller/deployment.yaml b/charts/argo-rollouts/templates/controller/deployment.yaml index 6237a0a8..25301e22 100644 --- a/charts/argo-rollouts/templates/controller/deployment.yaml +++ b/charts/argo-rollouts/templates/controller/deployment.yaml @@ -9,11 +9,9 @@ metadata: {{- end }} name: {{ include "argo-rollouts.fullname" . }} namespace: {{ .Release.Namespace | quote }} - {{- with (mergeOverwrite (deepCopy .Values.global.deploymentLabels) .Values.controller.deploymentLabels) }} labels: - {{- range $key, $value := . }} + {{- range $key, $value := (mergeOverwrite (deepCopy .Values.global.deploymentLabels) .Values.controller.deploymentLabels) }} {{ $key }}: {{ $value | quote }} - {{- end }} {{- end }} app.kubernetes.io/component: {{ .Values.controller.component }} {{- include "argo-rollouts.labels" . | nindent 4 }} diff --git a/charts/argo-rollouts/templates/dashboard/deployment.yaml b/charts/argo-rollouts/templates/dashboard/deployment.yaml index 2cb6c223..1c1d70c3 100644 --- a/charts/argo-rollouts/templates/dashboard/deployment.yaml +++ b/charts/argo-rollouts/templates/dashboard/deployment.yaml @@ -10,11 +10,9 @@ metadata: {{- end }} name: {{ include "argo-rollouts.fullname" . }}-dashboard namespace: {{ .Release.Namespace | quote }} - {{- with (mergeOverwrite (deepCopy .Values.global.deploymentLabels) .Values.dashboard.deploymentLabels) }} labels: - {{- range $key, $value := . }} + {{- range $key, $value := (mergeOverwrite (deepCopy .Values.global.deploymentLabels) .Values.dashboard.deploymentLabels) }} {{ $key }}: {{ $value | quote }} - {{- end }} {{- end }} app.kubernetes.io/component: {{ .Values.dashboard.component }} {{- include "argo-rollouts.labels" . | nindent 4 }}