Skip to content

Commit

Permalink
Fix svc endpoint extraction (#511)
Browse files Browse the repository at this point in the history
Co-authored-by: Tim Usner <[email protected]>
  • Loading branch information
aaronfern and timuthy authored Jul 28, 2022
1 parent 200060f commit 464b039
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/miscellaneous/miscellaneous.go
Original file line number Diff line number Diff line change
Expand Up @@ -328,8 +328,9 @@ func GetEtcdSvcEndpoint() (string, error) {
return "", fmt.Errorf("total length of tokens is less than four")
}
protocol := tokens[0]
svcName := tokens[1]
peerPort := tokens[3]
return fmt.Sprintf("%s://%s:%s", protocol, "etcd-main-client", peerPort), nil
return fmt.Sprintf("%s://%s:%s", protocol, svcName, peerPort), nil
}

// ProbeEtcd probes the etcd endpoint to check if an etcd is available
Expand Down

0 comments on commit 464b039

Please sign in to comment.