Skip to content

Commit

Permalink
Merge pull request #155 from RokibulHasan7/grpc
Browse files Browse the repository at this point in the history
Use `CreateSingleUseGrpcTunnelWithContext` and set keepAlive.time to 20 seconds
  • Loading branch information
FogDong authored Dec 18, 2024
2 parents 33c8891 + 60c9fa7 commit beb72a9
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pkg/apis/cluster/v1alpha1/transport.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,13 @@ var DialerGetter = func(ctx context.Context) (k8snet.DialFunc, error) {
if err != nil {
return nil, err
}
dialerTunnel, err := konnectivity.CreateSingleUseGrpcTunnel(
dialerTunnel, err := konnectivity.CreateSingleUseGrpcTunnelWithContext(
ctx,
context.Background(),
net.JoinHostPort(config.ClusterProxyHost, strconv.Itoa(config.ClusterProxyPort)),
grpc.WithTransportCredentials(grpccredentials.NewTLS(tlsCfg)),
grpc.WithKeepaliveParams(keepalive.ClientParameters{
Time: time.Second * 5,
Time: 20 * time.Second,
}),
)
if err != nil {
Expand Down

0 comments on commit beb72a9

Please sign in to comment.