From d934b9ed334b898fd956be0d646f32ab791b28d8 Mon Sep 17 00:00:00 2001 From: Zhen Zhao <70508195+JameKeal@users.noreply.github.com> Date: Wed, 29 Mar 2023 20:14:51 +0800 Subject: [PATCH] fix daemonset pod updater pointer error (#1340) --- pkg/controller/daemonpodupdater/util.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/controller/daemonpodupdater/util.go b/pkg/controller/daemonpodupdater/util.go index 75b08db65a4..0daa6fc58b6 100644 --- a/pkg/controller/daemonpodupdater/util.go +++ b/pkg/controller/daemonpodupdater/util.go @@ -73,7 +73,7 @@ func IsDaemonsetPodLatest(ds *appsv1.DaemonSet, pod *corev1.Pod) bool { klog.V(5).Infof("daemonset %v revision hash is %v", ds.Name, hash) klog.V(5).Infof("daemonset %v generation is %v", ds.Name, generation) - templateMatches := generation != nil && pod.Labels[extensions.DaemonSetTemplateGenerationKey] == fmt.Sprint(generation) + templateMatches := generation != nil && pod.Labels[extensions.DaemonSetTemplateGenerationKey] == fmt.Sprint(*generation) hashMatches := len(hash) > 0 && pod.Labels[extensions.DefaultDaemonSetUniqueLabelKey] == hash return hashMatches || templateMatches }