From b9eb552e0729026f31825fae778c8904f1957866 Mon Sep 17 00:00:00 2001 From: Prashanth Balasubramanian Date: Tue, 1 Mar 2016 11:47:53 -0800 Subject: [PATCH] Update the re-fetched pod with deployment labels. --- pkg/util/deployment/deployment.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/util/deployment/deployment.go b/pkg/util/deployment/deployment.go index 27a5a316fa8..c305c5bfb1c 100644 --- a/pkg/util/deployment/deployment.go +++ b/pkg/util/deployment/deployment.go @@ -248,8 +248,8 @@ func labelPodsWithHash(podList *api.PodList, c clientset.Interface, namespace, h for _, pod := range podList.Items { // Only label the pod that doesn't already have the new hash if pod.Labels[extensions.DefaultDeploymentUniqueLabelKey] != hash { - if _, err := updatePodWithRetries(c.Core().Pods(namespace), &pod, func(updated *api.Pod) { - pod.Labels = labelsutil.AddLabel(pod.Labels, extensions.DefaultDeploymentUniqueLabelKey, hash) + if _, err := updatePodWithRetries(c.Core().Pods(namespace), &pod, func(podToUpdate *api.Pod) { + podToUpdate.Labels = labelsutil.AddLabel(podToUpdate.Labels, extensions.DefaultDeploymentUniqueLabelKey, hash) }); err != nil { return err }