diff --git a/controllers/upgrade.go b/controllers/upgrade.go index 0953b60..7b063c6 100644 --- a/controllers/upgrade.go +++ b/controllers/upgrade.go @@ -282,6 +282,14 @@ func (r *BookkeeperClusterReconciler) syncBookkeeperVersion(bk *bookkeeperv1alph } if pod == nil { + pods, err := r.getStsPodsWithVersion(sts, bk.Status.TargetVersion) + if err != nil { + return false, err + } + if *sts.Spec.Replicas == (int32)(len(pods)) { + log.Infof("All bookkeeper pods are updated") + return false, nil + } return false, fmt.Errorf("could not obtain outdated pod") }