@@ -351,7 +351,7 @@ func (u *GenericPodUpdater) FilterAllowOpsPods(podToUpdate []*PodUpdateInfo, own
351
351
// if Pod has not been updated, update it.
352
352
podCh <- podToUpdate [i ]
353
353
}
354
- // 4. mark Pod to use updated revision before updating it.
354
+ // mark Pod to use updated revision before updating it.
355
355
if needUpdateContext {
356
356
u .recorder .Eventf (u .collaSet , corev1 .EventTypeNormal , "UpdateToPodContext" , "try to update ResourceContext for CollaSet" )
357
357
err := retry .RetryOnConflict (retry .DefaultRetry , func () error {
@@ -363,7 +363,6 @@ func (u *GenericPodUpdater) FilterAllowOpsPods(podToUpdate []*PodUpdateInfo, own
363
363
}
364
364
365
365
func (u * GenericPodUpdater ) FinishUpdatePod (podInfo * PodUpdateInfo ) error {
366
- //u.recorder.Eventf().V(1).Info("try to finish update PodOpsLifecycle for Pod", "pod", commonutils.ObjectKeyString(podInfo.Pod))
367
366
if updated , err := podopslifecycle .Finish (u .Client , collasetutils .UpdateOpsLifecycleAdapter , podInfo .Pod ); err != nil {
368
367
return fmt .Errorf ("failed to finish PodOpsLifecycle for updating Pod %s/%s: %s" , podInfo .Namespace , podInfo .Name , err )
369
368
} else if updated {
@@ -493,7 +492,7 @@ func (u *inPlaceIfPossibleUpdater) FulfillPodUpdatedInfo(
493
492
494
493
func (u * inPlaceIfPossibleUpdater ) UpgradePod (podInfo * PodUpdateInfo ) error {
495
494
if podInfo .OnlyMetadataChanged || podInfo .InPlaceUpdateSupport {
496
- // 6.1 if pod template changes only include metadata or support in-place update, just apply these changes to pod directly
495
+ // if pod template changes only include metadata or support in-place update, just apply these changes to pod directly
497
496
if err := u .podControl .UpdatePod (podInfo .UpdatedPod ); err != nil {
498
497
return fmt .Errorf ("fail to update Pod %s/%s when updating by in-place: %s" , podInfo .Namespace , podInfo .Name , err )
499
498
} else {
@@ -510,7 +509,7 @@ func (u *inPlaceIfPossibleUpdater) UpgradePod(podInfo *PodUpdateInfo) error {
510
509
}
511
510
}
512
511
} else {
513
- // 6.2 if pod has changes not in-place supported, recreate it
512
+ // if pod has changes not in-place supported, recreate it
514
513
return recreatePod (u .collaSet , podInfo , u .podControl , u .recorder )
515
514
}
516
515
return nil
0 commit comments