Skip to content

Commit

Permalink
Use CreateSingleUseGrpcTunnelWithContext and set keepAlive.time to …
Browse files Browse the repository at this point in the history
…20 seconds

Signed-off-by: Rokibul Hasan <[email protected]>
  • Loading branch information
RokibulHasan7 committed Dec 13, 2024
1 parent 33c8891 commit 60c9fa7
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 60c9fa7

Please sign in to comment.