diff --git a/apis/policy/v1alpha1/zz_generated.deepcopy.go b/apis/policy/v1alpha1/zz_generated.deepcopy.go index b0faab2e3c..1fe159a7ea 100644 --- a/apis/policy/v1alpha1/zz_generated.deepcopy.go +++ b/apis/policy/v1alpha1/zz_generated.deepcopy.go @@ -1,4 +1,3 @@ -//go:build !ignore_autogenerated // +build !ignore_autogenerated /* diff --git a/pkg/controller/daemonset/daemonset_controller.go b/pkg/controller/daemonset/daemonset_controller.go index 6f6a3b5dc9..fcd46501a7 100644 --- a/pkg/controller/daemonset/daemonset_controller.go +++ b/pkg/controller/daemonset/daemonset_controller.go @@ -405,7 +405,7 @@ func (dsc *ReconcileDaemonSet) syncDaemonSet(request reconcile.Request) error { if !isPreDownloadDisabled { if ds.Status.UpdatedNumberScheduled != ds.Status.DesiredNumberScheduled || - cur.Name != ds.Status.DaemonSetHash { + hash != ds.Status.DaemonSetHash { // get ads pre-download annotation minUpdatedReadyPodsCount := 0 if minUpdatedReadyPods, ok := ds.Annotations[appsv1alpha1.ImagePreDownloadMinUpdatedReadyPods]; ok { diff --git a/pkg/controller/daemonset/daemonset_predownload_image.go b/pkg/controller/daemonset/daemonset_predownload_image.go index 2a3271d19f..06f2724ae7 100644 --- a/pkg/controller/daemonset/daemonset_predownload_image.go +++ b/pkg/controller/daemonset/daemonset_predownload_image.go @@ -90,7 +90,7 @@ func (r *ReconcileDaemonSet) createImagePullJobsForInPlaceUpdate(ds *appsv1alpha for name, image := range containerImages { // job name is revision name + container name, it can not be more than 255 characters jobName := fmt.Sprintf("%s-%s", updateRevision.Name, name) - err := imagejobutilfunc.CreateJobForWorkload(r.Client, ds, clonesetutils.ControllerKind, jobName, image, labelMap, *selector, pullSecrets) + err := imagejobutilfunc.CreateJobForWorkload(r.Client, ds, controllerKind, jobName, image, labelMap, *selector, pullSecrets) if err != nil { if !errors.IsAlreadyExists(err) { klog.Errorf("DaemonSet %s/%s failed to create ImagePullJob %s: %v", ds.Namespace, ds.Name, jobName, err)