Skip to content

Commit

Permalink
chore: try to workaround master label with ipv6 issue, wip
Browse files Browse the repository at this point in the history
  • Loading branch information
cyrinux committed Dec 5, 2024
1 parent ad788fb commit 5527b83
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions internal/controller/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 5527b83

Please sign in to comment.