From 8e2c1707c2482d80643444bd9930bf42b049bf23 Mon Sep 17 00:00:00 2001 From: drivebyer Date: Thu, 1 Feb 2024 14:10:46 +0800 Subject: [PATCH] chore: enhance log every reconcile redis cluster Signed-off-by: drivebyer --- controllers/rediscluster_controller.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/controllers/rediscluster_controller.go b/controllers/rediscluster_controller.go index 7b10eee15..76b57d305 100644 --- a/controllers/rediscluster_controller.go +++ b/controllers/rediscluster_controller.go @@ -191,8 +191,8 @@ func (r *RedisClusterReconciler) Reconcile(ctx context.Context, req ctrl.Request } } - reqLogger.Info("Creating redis cluster by executing cluster creation commands", "Leaders.Ready", strconv.Itoa(int(redisLeaderInfo.Status.ReadyReplicas)), "Followers.Ready", strconv.Itoa(int(redisFollowerInfo.Status.ReadyReplicas))) if nc := k8sutils.CheckRedisNodeCount(ctx, r.K8sClient, r.Log, instance, ""); nc != totalReplicas { + reqLogger.Info("Creating redis cluster by executing cluster creation commands", "Leaders.Ready", strconv.Itoa(int(redisLeaderInfo.Status.ReadyReplicas)), "Followers.Ready", strconv.Itoa(int(redisFollowerInfo.Status.ReadyReplicas))) leaderCount := k8sutils.CheckRedisNodeCount(ctx, r.K8sClient, r.Log, instance, "leader") if leaderCount != leaderReplicas { reqLogger.Info("Not all leader are part of the cluster...", "Leaders.Count", leaderCount, "Instance.Size", leaderReplicas)