From f339e151a5d42e5387068f0b3db0c2f23f84159f Mon Sep 17 00:00:00 2001 From: Spyros Synodinos <138458697+ssyno@users.noreply.github.com> Date: Fri, 11 Oct 2024 19:17:55 +0300 Subject: [PATCH] Increase grpc buffer size (#165) * Increase grpc buffer size * go mod tidy * CHANGELOG --- CHANGELOG.md | 4 ++++ go.mod | 2 +- internal/pkg/teleport/client.go | 4 ++++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0df936eb..e79e771d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Fixed + +- Increased `grpc buffer` size + ## [0.11.1] - 2024-10-11 ### Fixed diff --git a/go.mod b/go.mod index 455fdfd2..1091b817 100644 --- a/go.mod +++ b/go.mod @@ -13,6 +13,7 @@ require ( github.com/onsi/ginkgo/v2 v2.20.0 github.com/onsi/gomega v1.34.1 github.com/pkg/errors v0.9.1 + google.golang.org/grpc v1.65.0 gopkg.in/yaml.v3 v3.0.1 k8s.io/api v0.25.0 k8s.io/apimachinery v0.25.0 @@ -104,7 +105,6 @@ require ( gomodules.xyz/jsonpatch/v2 v2.2.0 // indirect google.golang.org/genproto/googleapis/api v0.0.0-20240701130421-f6361c86f094 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20240701130421-f6361c86f094 // indirect - google.golang.org/grpc v1.65.0 // indirect google.golang.org/protobuf v1.34.2 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect diff --git a/internal/pkg/teleport/client.go b/internal/pkg/teleport/client.go index 790fcb4d..c3f12941 100644 --- a/internal/pkg/teleport/client.go +++ b/internal/pkg/teleport/client.go @@ -6,6 +6,7 @@ import ( tc "github.com/gravitational/teleport/api/client" "github.com/gravitational/teleport/api/client/proto" "github.com/gravitational/teleport/api/types" + "google.golang.org/grpc" "github.com/giantswarm/microerror" ) @@ -27,6 +28,9 @@ var NewClient = func(ctx context.Context, proxyAddr, identityFile string) (Clien Credentials: []tc.Credentials{ tc.LoadIdentityFileFromString(identityFile), }, + DialOpts: []grpc.DialOption{ + grpc.WithDefaultCallOptions(grpc.MaxCallRecvMsgSize(10 * 1024 * 1024)), + }, }) if err != nil { return nil, microerror.Mask(err)