fix expected master count

This commit is contained in:
Chris Lu 2020-11-08 22:34:04 -08:00
parent 6bb6a1bae6
commit fab237e7ef
1 changed files with 2 additions and 2 deletions

View File

@ -70,8 +70,8 @@ func (r *SeaweedReconciler) waitForMasterStatefulSet(seaweedCR *seaweedv1.Seawee
}
}
if runningCounter < len(podList.Items)/2+1 {
log.Info("some masters are not ready", "missing", len(podList.Items)-runningCounter)
if runningCounter < int(seaweedCR.Spec.Master.Replicas)/2+1 {
log.Info("some masters are not ready", "missing", int(seaweedCR.Spec.Master.Replicas)-runningCounter)
return true, ctrl.Result{RequeueAfter: 3 * time.Second}, nil
}