Merge pull request #113486 from jkh52/uds-dial

egress_selector.go: hard cap UDS dial.
This commit is contained in:
Kubernetes Prow Robot
2022-11-08 13:51:27 -08:00
committed by GitHub

View File

@@ -217,6 +217,9 @@ func (u *udsGRPCConnector) connect(_ context.Context) (proxier, error) {
// See https://github.com/kubernetes-sigs/apiserver-network-proxy/issues/357.
tunnelCtx := context.TODO()
tunnel, err := client.CreateSingleUseGrpcTunnel(tunnelCtx, udsName, dialOption,
grpc.WithBlock(),
grpc.WithReturnConnectionError(),
grpc.WithTimeout(30*time.Second), // matches http.DefaultTransport dial timeout
grpc.WithTransportCredentials(insecure.NewCredentials()))
if err != nil {
return nil, err