Skip to content

Commit c6dda48

Browse files
author
lamai93
committed
Wait for coordinator to be ready in kubernetes.
1 parent eed8ea1 commit c6dda48

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

pkg/deployment/reconcile/action_wait_for_member_up.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,16 @@ func (a *actionWaitForMemberUp) checkProgressCluster(ctx context.Context) (bool,
167167
log.Debug().Str("status", string(sh.Status)).Msg("Member set status not yet good")
168168
return false, false, nil
169169
}
170+
// Wait for the member to become ready from a kubernetes point of view
171+
// otherwise the coordinators may be rotated to fast and thus none of them
172+
// is ready resulting in a short downtime
173+
if m, found := a.actionCtx.GetMemberStatusByID(a.MemberID()); !found {
174+
log.Error().Msg("No such member")
175+
return false, true, nil
176+
} else if !m.Conditions.IsTrue(api.ConditionTypeReady) {
177+
log.Debug().Msg("Member not yet ready")
178+
return false, false, nil
179+
}
170180
return true, false, nil
171181
}
172182

0 commit comments

Comments
 (0)