diff --git a/internal/controller/util.go b/internal/controller/util.go index 5056b69..c44c2e6 100644 --- a/internal/controller/util.go +++ b/internal/controller/util.go @@ -89,7 +89,7 @@ func getLatestReplica(ctx context.Context, c client.Client, statefulSet *appsv1. // replTakeover runs the replTakeOver on the given replica pod func replTakeover(ctx context.Context, c client.Client, newMaster *corev1.Pod) error { - addr := net.JoinHostPort(newMaster.Status.PodIP, "6379") + addr := net.JoinHostPort(newMaster.Status.PodIP, fmt.Sprintf("%v", resources.DragonflyPort)) redisClient := redis.NewClient(&redis.Options{ Addr: addr, @@ -118,8 +118,7 @@ func isStableState(ctx context.Context, pod *corev1.Pod) (bool, error) { return false, nil } - // Use net.JoinHostPort for proper address formatting - addr := net.JoinHostPort(pod.Status.PodIP, "9999") + addr := net.JoinHostPort(pod.Status.PodIP, fmt.Sprintf("%v", resources.DragonflyAdminPort)) redisClient := redis.NewClient(&redis.Options{ Addr: addr,