Skip to content

Commit 9664920

Browse files
committed
feat: set scaling conditions to false once the fast scaling is completed
1 parent f9c9bf3 commit 9664920

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

controllers/redis_manager.go

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -797,7 +797,13 @@ func (r *RedkeyClusterReconciler) doFastScaling(ctx context.Context, redkeyClust
797797
return true, nil
798798
}
799799

800-
// The cluster is now scaled, and we can set the Cluster Status as Ready again and remove the Substatus.
800+
// The cluster is now scaled, and we can set the Cluster Status to Ready again, remove the Substatus and update conditions accordingly.
801+
switch redkeyCluster.Status.Status {
802+
case redkeyv1.StatusScalingUp:
803+
setConditionFalse(logger, redkeyCluster, redkeyv1.ConditionScalingUp)
804+
case redkeyv1.StatusScalingDown:
805+
setConditionFalse(logger, redkeyCluster, redkeyv1.ConditionScalingDown)
806+
}
801807
redkeyCluster.Status.Status = redkeyv1.StatusReady
802808
redkeyCluster.Status.Substatus.Status = ""
803809
r.setConditionTrue(redkeyCluster, redkeyv1.ConditionReady, "Redkey cluster is ready")

0 commit comments

Comments
 (0)