Skip to content

Commit 5ccc76e

Browse files
nixpanicmergify[bot]
authored andcommitted
Explicitly disable gRPC idle timeout
The idle timeout was disabled, but has been enabled by default in google.golang.org/grpc v1.59. The kubernetes-csi-addons operator acts similarly to the Kubernetes external-provisioner, and benefits from having a functional gRPC connection open to the csi-addons sidecars that run alongside CSI-drivers. See-also: kubernetes-csi/external-provisioner#1099 Signed-off-by: Niels de Vos <ndevos@ibm.com>
1 parent d97f4c3 commit 5ccc76e

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

internal/connection/connection.go

+5-2
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,11 @@ type Connection struct {
3838
// NewConnection establishes connection with sidecar, fetches capability and returns Connection object
3939
// filled with required information.
4040
func NewConnection(ctx context.Context, endpoint, nodeID, driverName string) (*Connection, error) {
41-
opts := grpc.WithTransportCredentials(insecure.NewCredentials())
42-
cc, err := grpc.Dial(endpoint, opts)
41+
opts := []grpc.DialOption{
42+
grpc.WithTransportCredentials(insecure.NewCredentials()),
43+
grpc.WithIdleTimeout(time.Duration(0)),
44+
}
45+
cc, err := grpc.Dial(endpoint, opts...)
4346
if err != nil {
4447
return nil, err
4548
}

0 commit comments

Comments
 (0)