diff --git a/artifacts/images/agent-build.Dockerfile b/artifacts/images/agent-build.Dockerfile index 378ab7ed5..c7c8d7ab2 100644 --- a/artifacts/images/agent-build.Dockerfile +++ b/artifacts/images/agent-build.Dockerfile @@ -1,5 +1,5 @@ # Build the proxy-agent binary -FROM golang:1.19.13 as builder +FROM golang:1.20.10 as builder # Copy in the go src WORKDIR /go/src/sigs.k8s.io/apiserver-network-proxy diff --git a/artifacts/images/server-build.Dockerfile b/artifacts/images/server-build.Dockerfile index ad5442d6f..e5af7aa0c 100644 --- a/artifacts/images/server-build.Dockerfile +++ b/artifacts/images/server-build.Dockerfile @@ -1,5 +1,5 @@ # Build the proxy-server binary -FROM golang:1.19.13 as builder +FROM golang:1.20.10 as builder # Copy in the go src WORKDIR /go/src/sigs.k8s.io/apiserver-network-proxy diff --git a/artifacts/images/test-client-build.Dockerfile b/artifacts/images/test-client-build.Dockerfile index 594c504e8..e5b0fefc1 100644 --- a/artifacts/images/test-client-build.Dockerfile +++ b/artifacts/images/test-client-build.Dockerfile @@ -1,5 +1,5 @@ # Build the client binary -FROM golang:1.19.13 as builder +FROM golang:1.20.10 as builder # Copy in the go src WORKDIR /go/src/sigs.k8s.io/apiserver-network-proxy diff --git a/artifacts/images/test-server-build.Dockerfile b/artifacts/images/test-server-build.Dockerfile index e2d0e2efc..b42535abd 100644 --- a/artifacts/images/test-server-build.Dockerfile +++ b/artifacts/images/test-server-build.Dockerfile @@ -1,5 +1,5 @@ # Build the http test server binary -FROM golang:1.19.13 as builder +FROM golang:1.20.10 as builder # Copy in the go src WORKDIR /go/src/sigs.k8s.io/apiserver-network-proxy diff --git a/go.mod b/go.mod index 733a32d09..e31f551dc 100644 --- a/go.mod +++ b/go.mod @@ -11,7 +11,7 @@ require ( github.com/stretchr/testify v1.8.1 go.uber.org/goleak v1.2.1 golang.org/x/net v0.17.0 - google.golang.org/grpc v1.54.0 + google.golang.org/grpc v1.56.3 google.golang.org/protobuf v1.30.0 k8s.io/api v0.27.4 k8s.io/apimachinery v0.27.4 @@ -51,7 +51,7 @@ require ( github.com/prometheus/client_model v0.3.0 // indirect github.com/prometheus/common v0.37.0 // indirect github.com/prometheus/procfs v0.8.0 // indirect - golang.org/x/oauth2 v0.4.0 // indirect + golang.org/x/oauth2 v0.7.0 // indirect golang.org/x/sys v0.13.0 // indirect golang.org/x/term v0.13.0 // indirect golang.org/x/text v0.13.0 // indirect diff --git a/go.sum b/go.sum index 7d9706b10..18974f771 100644 --- a/go.sum +++ b/go.sum @@ -353,8 +353,8 @@ golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4Iltr golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= -golang.org/x/oauth2 v0.4.0 h1:NF0gk8LVPg1Ml7SSbGyySuoxdsXitj7TvgvuRxIMc/M= -golang.org/x/oauth2 v0.4.0/go.mod h1:RznEsdpjGAINPTOF0UH/t+xJ75L18YO3Ho6Pyn+uRec= +golang.org/x/oauth2 v0.7.0 h1:qe6s0zUXlPX80/dITx3440hWZ7GwMwgDDyrSGTPJG/g= +golang.org/x/oauth2 v0.7.0/go.mod h1:hPLQkd9LyjfXTiRohC/41GhcFqxisoUQ99sCUOHO9x4= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -543,8 +543,8 @@ google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKa google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.54.0 h1:EhTqbhiYeixwWQtAEZAxmV9MGqcjEU2mFx52xCzNyag= -google.golang.org/grpc v1.54.0/go.mod h1:PUSEXI6iWghWaB6lXM4knEgpJNu2qUcKfDtNci3EC2g= +google.golang.org/grpc v1.56.3 h1:8I4C0Yq1EjstUzUJzpcRVbuYA2mODtEmpWiQoN/b2nc= +google.golang.org/grpc v1.56.3/go.mod h1:I9bI3vqKfayGqPUAwGdOSu7kt6oIJLixfffKrpXqQ9s= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= diff --git a/konnectivity-client/go.mod b/konnectivity-client/go.mod index 0be235819..3a407d8c2 100644 --- a/konnectivity-client/go.mod +++ b/konnectivity-client/go.mod @@ -8,7 +8,7 @@ require ( github.com/prometheus/client_golang v1.11.1 go.uber.org/goleak v1.2.0 golang.org/x/net v0.17.0 // indirect - google.golang.org/grpc v1.54.0 + google.golang.org/grpc v1.56.3 google.golang.org/protobuf v1.30.0 k8s.io/klog/v2 v2.0.0 ) diff --git a/konnectivity-client/go.sum b/konnectivity-client/go.sum index 39954a06c..ea3c6b76d 100644 --- a/konnectivity-client/go.sum +++ b/konnectivity-client/go.sum @@ -138,8 +138,8 @@ golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8T google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/genproto/googleapis/rpc v0.0.0-20230525234030-28d5490b6b19 h1:0nDDozoAU19Qb2HwhXadU8OcsiO/09cnTqhUtq2MEOM= google.golang.org/genproto/googleapis/rpc v0.0.0-20230525234030-28d5490b6b19/go.mod h1:66JfowdXAEgad5O9NnYcsNPLCPZJD++2L9X0PCMODrA= -google.golang.org/grpc v1.54.0 h1:EhTqbhiYeixwWQtAEZAxmV9MGqcjEU2mFx52xCzNyag= -google.golang.org/grpc v1.54.0/go.mod h1:PUSEXI6iWghWaB6lXM4knEgpJNu2qUcKfDtNci3EC2g= +google.golang.org/grpc v1.56.3 h1:8I4C0Yq1EjstUzUJzpcRVbuYA2mODtEmpWiQoN/b2nc= +google.golang.org/grpc v1.56.3/go.mod h1:I9bI3vqKfayGqPUAwGdOSu7kt6oIJLixfffKrpXqQ9s= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= diff --git a/tests/proxy_test.go b/tests/proxy_test.go index 53a2aaf16..6a39e29d4 100644 --- a/tests/proxy_test.go +++ b/tests/proxy_test.go @@ -268,7 +268,7 @@ func TestProxyHandle_RequestDeadlineExceeded_GRPC(t *testing.T) { func() { // Ensure that tunnels aren't leaked with long-running servers. - defer goleak.VerifyNone(t, goleak.IgnoreCurrent()) + defer goleak.VerifyNone(t, goleak.IgnoreCurrent(), goleak.IgnoreTopFunction("google.golang.org/grpc.(*addrConn).resetTransport")) // run test client tunnel, err := client.CreateSingleUseGrpcTunnel(context.Background(), proxy.front, grpc.WithInsecure()) @@ -329,7 +329,7 @@ func TestProxyDial_RequestCancelled_GRPC(t *testing.T) { func() { // Ensure that tunnels aren't leaked with long-running servers. - defer goleak.VerifyNone(t, goleak.IgnoreCurrent()) + defer goleak.VerifyNone(t, goleak.IgnoreCurrent(), goleak.IgnoreTopFunction("google.golang.org/grpc.(*addrConn).resetTransport")) // run test client tunnel, err := client.CreateSingleUseGrpcTunnel(context.Background(), proxy.front, grpc.WithInsecure()) @@ -423,7 +423,10 @@ func TestProxyDial_RequestCancelled_Concurrent_GRPC(t *testing.T) { } // Ensure that tunnels aren't leaked with long-running servers. - ignoredGoRoutines := goleak.IgnoreCurrent() + ignoredGoRoutines := []goleak.Option{ + goleak.IgnoreCurrent(), + goleak.IgnoreTopFunction("google.golang.org/grpc.(*addrConn).resetTransport"), + } const concurrentConns = 50 wg.Add(concurrentConns) @@ -437,7 +440,7 @@ func TestProxyDial_RequestCancelled_Concurrent_GRPC(t *testing.T) { var endpointConnsErr, goLeaksErr error wait.PollImmediate(time.Second, wait.ForeverTestTimeout, func() (done bool, err error) { endpointConnsErr = metricstest.ExpectAgentEndpointConnections(0) - goLeaksErr = goleak.Find(ignoredGoRoutines) + goLeaksErr = goleak.Find(ignoredGoRoutines...) return endpointConnsErr == nil && goLeaksErr == nil, nil }) @@ -467,7 +470,7 @@ func TestProxyDial_AgentTimeout_GRPC(t *testing.T) { func() { // Ensure that tunnels aren't leaked with long-running servers. - defer goleak.VerifyNone(t, goleak.IgnoreCurrent()) + defer goleak.VerifyNone(t, goleak.IgnoreCurrent(), goleak.IgnoreTopFunction("google.golang.org/grpc.(*addrConn).resetTransport")) // run test client tunnel, err := client.CreateSingleUseGrpcTunnel(context.Background(), proxy.front, grpc.WithInsecure()) @@ -1069,7 +1072,7 @@ func expectCleanShutdown(t testing.TB) { resetAllMetrics() currentGoRoutines := goleak.IgnoreCurrent() t.Cleanup(func() { - goleak.VerifyNone(t, currentGoRoutines) + goleak.VerifyNone(t, currentGoRoutines, goleak.IgnoreTopFunction("google.golang.org/grpc.(*addrConn).resetTransport")) assertNoClientDialFailures(t) assertNoServerDialFailures(t) assertNoAgentDialFailures(t)