From 9b46f9f0f43353f2df22fe4a766030fc4c8f15ca Mon Sep 17 00:00:00 2001 From: Ramon Silveira Borges Date: Sun, 24 Mar 2024 21:35:10 +0100 Subject: [PATCH] feat: add grpc buffer size in the configmap struct --- internal/ingress/controller/config/config.go | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/internal/ingress/controller/config/config.go b/internal/ingress/controller/config/config.go index 12bbb662a..848747769 100644 --- a/internal/ingress/controller/config/config.go +++ b/internal/ingress/controller/config/config.go @@ -17,11 +17,10 @@ limitations under the License. package config import ( + "k8s.io/klog/v2" "strconv" "time" - "k8s.io/klog/v2" - apiv1 "k8s.io/api/core/v1" "k8s.io/ingress-nginx/internal/ingress/defaults" @@ -752,6 +751,11 @@ type Configuration struct { // alphanumeric chars, "-", "_", "/".In case of additional characters, // like used on Rewrite configurations the user should use pathType as ImplementationSpecific StrictValidatePathType bool `json:"strict-validate-path-type"` + + // GRPCBufferSizeKb Sets the size of the buffer used for reading the response received + // from the gRPC server. The response is passed to the client synchronously, + // as soon as it is received. + GRPCBufferSizeKb int `json:"grpc-buffer-size-kb"` } // NewDefault returns the default nginx configuration @@ -917,6 +921,7 @@ func NewDefault() Configuration { GlobalRateLimitStatucCode: 429, DebugConnections: []string{}, StrictValidatePathType: false, // TODO: This will be true in future releases + GRPCBufferSizeKb: 0, } if klog.V(5).Enabled() {