Skip to content

Commit

Permalink
requeue if not ready
Browse files Browse the repository at this point in the history
Signed-off-by: Jordan Rodgers <[email protected]>
  • Loading branch information
com6056 committed Aug 2, 2024
1 parent a9f97cb commit 62b750c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion controllers/rediscluster_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ func (r *RedisClusterReconciler) Reconcile(ctx context.Context, req ctrl.Request
}

if !(r.IsStatefulSetReady(ctx, r.K8sClient, instance, instance.Name+"-leader", instance.Namespace) && r.IsStatefulSetReady(ctx, r.K8sClient, instance, instance.Name+"-follower", instance.Namespace)) {
return intctrlutil.Reconciled()
return intctrlutil.RequeueAfter(reqLogger, time.Second*10, "Redis cluster is not ready")
}

// Mark the cluster status as bootstrapping if all the leader and follower nodes are ready
Expand Down
2 changes: 1 addition & 1 deletion controllers/redisreplication_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ func (r *RedisReplicationReconciler) Reconcile(ctx context.Context, req ctrl.Req
return intctrlutil.RequeueWithError(err, reqLogger, "")
}
if !r.IsStatefulSetReady(ctx, r.K8sClient, instance, instance.Name, instance.Namespace) {
return intctrlutil.Reconciled()
return intctrlutil.RequeueAfter(reqLogger, time.Second*10, "")
}

var realMaster string
Expand Down

0 comments on commit 62b750c

Please sign in to comment.