diff --git a/synced-pool.go b/synced-pool.go index 65db9ad..a886e31 100644 --- a/synced-pool.go +++ b/synced-pool.go @@ -15,6 +15,7 @@ import ( "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/promauto" "google.golang.org/grpc" + "google.golang.org/grpc/credentials/insecure" "k8s.io/apimachinery/pkg/watch" ) @@ -191,7 +192,7 @@ func (p *SyncedPool) AddRemote(host string) { target := fmt.Sprintf("%s:1337", host) //ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second) //defer cancel() - conn, err := grpc.NewClient(target) //grpc.DialContext(ctx, target, grpc.WithInsecure(), grpc.WithBlock()) + conn, err := grpc.NewClient(target, grpc.WithTransportCredentials(insecure.NewCredentials())) //grpc.DialContext(ctx, target, grpc.WithInsecure(), grpc.WithBlock()) if err != nil { log.Printf("AddRemote: dial %s failed: %v", target, err) return