Skip to content

Commit

Permalink
chore(v2alpha2): scale down sts must wait cluster ready
Browse files Browse the repository at this point in the history
  • Loading branch information
Rory-Z committed Jun 26, 2023
1 parent 32f217d commit e0a9b17
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion controllers/apps/v2alpha2/add_emqx_core.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ func (a *addCore) syncStatefulSet(ctx context.Context, instance *appsv2alpha2.EM
old := stsList[0].DeepCopy()
eList := getEventList(ctx, a.Clientset, old)

if canBeScaledDown(instance, appsv2alpha2.CodeNodesReady, eList) {
if canBeScaledDown(instance, appsv2alpha2.Ready, eList) {
old.Spec.Replicas = pointer.Int32Ptr(old.Status.Replicas - 1)
if err := a.Client.Update(ctx, old); err != nil {
return emperror.Wrap(err, "failed to scale down old replicaSet")
Expand Down

0 comments on commit e0a9b17

Please sign in to comment.