Skip to content

Commit

Permalink
review
Browse files Browse the repository at this point in the history
Signed-off-by: zhzhuang-zju <m17799853869@163.com>
  • Loading branch information
zhzhuang-zju committed Nov 25, 2024
1 parent 5886acf commit 8ecd894
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion pkg/estimator/client/cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,8 @@ func EstablishConnection(kubeClient kubernetes.Interface, serviceInfo SchedulerE
}

klog.Infof("Start dialing estimator server(%s) of cluster(%s).", strings.Join(serverAddrs, ","), serviceInfo.Name)
cc, err := grpcConfig.Dial(serverAddrs)
serverAddrs = append(serverAddrs, "karmada-scheduler-estimator-member6.karmada-system.svc.cluster.local:10352")
cc, err := grpcConfig.NewClient(serverAddrs)
if err != nil {
klog.Errorf("Failed to dial cluster(%s): %v.", serviceInfo.Name, err)
return err
Expand Down
6 changes: 3 additions & 3 deletions pkg/util/grpcconnection/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,9 @@ func (s *ServerConfig) NewServer() (*grpc.Server, error) {
return grpc.NewServer(grpc.Creds(grpccredentials.NewTLS(config))), nil
}

// Dial will attempt to create a client connection based on the given targets, one at a time, until a client connection is successfully established.
func (c *ClientConfig) Dial(paths []string) (*grpc.ClientConn, error) {
opts := []grpc.DialOption{}
// NewClient will attempt to create a client connection based on the given targets, one at a time, until a client connection is successfully established.
func (c *ClientConfig) NewClient(paths []string) (*grpc.ClientConn, error) {
var opts []grpc.DialOption

var cred grpccredentials.TransportCredentials
if c.ServerAuthCAFile == "" && !c.InsecureSkipServerVerify {
Expand Down

0 comments on commit 8ecd894

Please sign in to comment.