Skip to content

Commit

Permalink
Feat: check whether the updatedReadyPodsCount greater than minUpdated…
Browse files Browse the repository at this point in the history
…ReadyPodsCount

Signed-off-by: Hanmengnan <1448189829@qq.com>
  • Loading branch information
Hanmengnan committed Jul 23, 2023
1 parent 4e35a1d commit 1656674
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions pkg/controller/daemonset/daemonset_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -415,11 +415,11 @@ func (dsc *ReconcileDaemonSet) syncDaemonSet(request reconcile.Request) error {
klog.Errorf("Failed to GetScaledValueFromIntOrPercent of minUpdatedReadyPods for %s: %v", request, err)
}
}
// todo: check whether the updatedReadyPodsCount greater than minUpdatedReadyPodsCount
_ = minUpdatedReadyPodsCount
// pre-download images for new revision
if err := dsc.createImagePullJobsForInPlaceUpdate(ds, old, cur); err != nil {
klog.Errorf("Failed to create ImagePullJobs for %s: %v", request, err)
if minUpdatedReadyPodsCount <= int(ds.Status.UpdatedNumberScheduled) {
// pre-download images for new revision
if err := dsc.createImagePullJobsForInPlaceUpdate(ds, old, cur); err != nil {
klog.Errorf("Failed to create ImagePullJobs for %s: %v", request, err)
}
}
} else {
// delete ImagePullJobs if revisions have been consistent
Expand Down

0 comments on commit 1656674

Please sign in to comment.