feat: add grpc buffer size in the configmap struct

This commit is contained in:
Ramon Silveira Borges 2024-03-24 21:35:10 +01:00
parent 3a6c9c8b92
commit 9b46f9f0f4

View file

@ -17,11 +17,10 @@ limitations under the License.
package config package config
import ( import (
"k8s.io/klog/v2"
"strconv" "strconv"
"time" "time"
"k8s.io/klog/v2"
apiv1 "k8s.io/api/core/v1" apiv1 "k8s.io/api/core/v1"
"k8s.io/ingress-nginx/internal/ingress/defaults" "k8s.io/ingress-nginx/internal/ingress/defaults"
@ -752,6 +751,11 @@ type Configuration struct {
// alphanumeric chars, "-", "_", "/".In case of additional characters, // alphanumeric chars, "-", "_", "/".In case of additional characters,
// like used on Rewrite configurations the user should use pathType as ImplementationSpecific // like used on Rewrite configurations the user should use pathType as ImplementationSpecific
StrictValidatePathType bool `json:"strict-validate-path-type"` 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 // NewDefault returns the default nginx configuration
@ -917,6 +921,7 @@ func NewDefault() Configuration {
GlobalRateLimitStatucCode: 429, GlobalRateLimitStatucCode: 429,
DebugConnections: []string{}, DebugConnections: []string{},
StrictValidatePathType: false, // TODO: This will be true in future releases StrictValidatePathType: false, // TODO: This will be true in future releases
GRPCBufferSizeKb: 0,
} }
if klog.V(5).Enabled() { if klog.V(5).Enabled() {