From cff087d1a9588765b997446d2e7b075f473a436d Mon Sep 17 00:00:00 2001 From: JameKeal <413621396@qq.com> Date: Wed, 29 Mar 2023 18:45:08 +0800 Subject: [PATCH] fix daemonset pod updater pointer error --- 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 }