From 464b0397477daf3012d36bc60769008c3c49c7c3 Mon Sep 17 00:00:00 2001 From: Aaron Francis Fernandes <79958509+aaronfern@users.noreply.github.com> Date: Thu, 28 Jul 2022 12:37:46 +0530 Subject: [PATCH] Fix svc endpoint extraction (#511) Co-authored-by: Tim Usner --- pkg/miscellaneous/miscellaneous.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/miscellaneous/miscellaneous.go b/pkg/miscellaneous/miscellaneous.go index cb882eba2..3a4a63cec 100644 --- a/pkg/miscellaneous/miscellaneous.go +++ b/pkg/miscellaneous/miscellaneous.go @@ -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