From 75e885ecec37ebb5d8461ed961a23610b0bd3fb1 Mon Sep 17 00:00:00 2001 From: Qi Guo <979918879@qq.com> Date: Wed, 14 Jan 2026 15:31:58 +0800 Subject: [PATCH 1/3] feat: support more gateway config --- charts/gateway/templates/configmap.yaml | 11 +++++++---- charts/gateway/values.yaml | 14 ++++++++++++++ 2 files changed, 21 insertions(+), 4 deletions(-) diff --git a/charts/gateway/templates/configmap.yaml b/charts/gateway/templates/configmap.yaml index e6db6b3..7e517d9 100644 --- a/charts/gateway/templates/configmap.yaml +++ b/charts/gateway/templates/configmap.yaml @@ -197,10 +197,13 @@ data: {{- .Values.logs.accessLogFormat | nindent 10 }} access_log_format_escape: {{ .Values.logs.accessLogFormatEscape }} {{- end }} - keepalive_timeout: 60s # timeout during which a keep-alive client connection will stay open on the server side. - client_header_timeout: 60s # timeout for reading client request header, then 408 (Request Time-out) error is returned to the client - client_body_timeout: 60s # timeout for reading client request body, then 408 (Request Time-out) error is returned to the client - send_timeout: 10s # timeout for transmitting a response to the client.then the connection is closed + keepalive_timeout: {{ default "60s" .Values.nginx.http.keepaliveTimeout }} # timeout during which a keep-alive client connection will stay open on the server side. + client_header_timeout: {{ default "60s" .Values.nginx.http.clientHeaderTimeout }} # timeout for reading client request header, then 408 (Request Time-out) error is returned to the client + client_body_timeout: {{ default "60s" .Values.nginx.http.clientBodyTimeout }} # timeout for reading client request body, then 408 (Request Time-out) error is returned to the client + send_timeout: {{ default "10s" .Values.nginx.http.sendTimeout }} # timeout for transmitting a response to the client.then the connection is closed + client_max_body_size: {{ default 0 .Values.nginx.http.clientMaxBodySize }} # The maximum allowed size of the client request body. + # If exceeded, the 413 (Request Entity Too Large) error is returned to the client. + # Note that unlike Nginx, we don't limit the body size by default. underscores_in_headers: "on" # default enables the use of underscores in client request header fields real_ip_header: "X-Real-IP" # http://nginx.org/en/docs/http/ngx_http_realip_module.html#real_ip_header real_ip_from: # http://nginx.org/en/docs/http/ngx_http_realip_module.html#set_real_ip_from diff --git a/charts/gateway/values.yaml b/charts/gateway/values.yaml index ca1bcb1..318807e 100644 --- a/charts/gateway/values.yaml +++ b/charts/gateway/values.yaml @@ -425,6 +425,20 @@ nginx: workerProcesses: auto enableCPUAffinity: true envs: [] + # -- HTTP timeout configurations + http: + # -- timeout during which a keep-alive client connection will stay open on the server side + keepaliveTimeout: "60s" + # -- timeout for reading client request header, then 408 (Request Time-out) error is returned to the client + clientHeaderTimeout: "60s" + # -- timeout for reading client request body, then 408 (Request Time-out) error is returned to the client + clientBodyTimeout: "60s" + # -- timeout for transmitting a response to the client, then the connection is closed + sendTimeout: "10s" + # -- The maximum allowed size of the client request body. + # If exceeded, the 413 (Request Entity Too Large) error is returned to the client. + # Note that unlike Nginx, we don't limit the body size by default (0 means no limit). + clientMaxBodySize: 0 # -- Set APISIX plugin attributes, see [config-default.yaml](https://github.com/apache/apisix/blob/master/conf/config-default.yaml#L376) for more details pluginAttrs: {} From 6c2a1dae98afa76ef49d19921055f6a6d302703a Mon Sep 17 00:00:00 2001 From: Qi Guo <979918879@qq.com> Date: Wed, 14 Jan 2026 15:39:31 +0800 Subject: [PATCH 2/3] fix --- charts/gateway/Chart.yaml | 2 +- charts/gateway/templates/configmap.yaml | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/charts/gateway/Chart.yaml b/charts/gateway/Chart.yaml index 927bf61..3ad69dd 100644 --- a/charts/gateway/Chart.yaml +++ b/charts/gateway/Chart.yaml @@ -14,7 +14,7 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.2.44 +version: 0.2.45 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to diff --git a/charts/gateway/templates/configmap.yaml b/charts/gateway/templates/configmap.yaml index 7e517d9..f08866f 100644 --- a/charts/gateway/templates/configmap.yaml +++ b/charts/gateway/templates/configmap.yaml @@ -197,11 +197,11 @@ data: {{- .Values.logs.accessLogFormat | nindent 10 }} access_log_format_escape: {{ .Values.logs.accessLogFormatEscape }} {{- end }} - keepalive_timeout: {{ default "60s" .Values.nginx.http.keepaliveTimeout }} # timeout during which a keep-alive client connection will stay open on the server side. - client_header_timeout: {{ default "60s" .Values.nginx.http.clientHeaderTimeout }} # timeout for reading client request header, then 408 (Request Time-out) error is returned to the client - client_body_timeout: {{ default "60s" .Values.nginx.http.clientBodyTimeout }} # timeout for reading client request body, then 408 (Request Time-out) error is returned to the client - send_timeout: {{ default "10s" .Values.nginx.http.sendTimeout }} # timeout for transmitting a response to the client.then the connection is closed - client_max_body_size: {{ default 0 .Values.nginx.http.clientMaxBodySize }} # The maximum allowed size of the client request body. + keepalive_timeout: {{ .Values.nginx.http.keepaliveTimeout }} # timeout during which a keep-alive client connection will stay open on the server side. + client_header_timeout: {{ .Values.nginx.http.clientHeaderTimeout }} # timeout for reading client request header, then 408 (Request Time-out) error is returned to the client + client_body_timeout: {{ .Values.nginx.http.clientBodyTimeout }} # timeout for reading client request body, then 408 (Request Time-out) error is returned to the client + send_timeout: {{ .Values.nginx.http.sendTimeout }} # timeout for transmitting a response to the client.then the connection is closed + client_max_body_size: {{ .Values.nginx.http.clientMaxBodySize }} # The maximum allowed size of the client request body. # If exceeded, the 413 (Request Entity Too Large) error is returned to the client. # Note that unlike Nginx, we don't limit the body size by default. underscores_in_headers: "on" # default enables the use of underscores in client request header fields From e4ed8e2e910a4e1b8cc9672382afa93581234db8 Mon Sep 17 00:00:00 2001 From: Qi Guo <979918879@qq.com> Date: Wed, 14 Jan 2026 15:43:14 +0800 Subject: [PATCH 3/3] fix --- charts/gateway/README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/charts/gateway/README.md b/charts/gateway/README.md index 8d6ff80..6343d65 100644 --- a/charts/gateway/README.md +++ b/charts/gateway/README.md @@ -211,6 +211,12 @@ The command removes all the Kubernetes components associated with the chart and | nameOverride | string | `""` | | | nginx.enableCPUAffinity | bool | `true` | | | nginx.envs | list | `[]` | | +| nginx.http | object | `{"clientBodyTimeout":"60s","clientHeaderTimeout":"60s","clientMaxBodySize":0,"keepaliveTimeout":"60s","sendTimeout":"10s"}` | HTTP timeout configurations | +| nginx.http.clientBodyTimeout | string | `"60s"` | timeout for reading client request body, then 408 (Request Time-out) error is returned to the client | +| nginx.http.clientHeaderTimeout | string | `"60s"` | timeout for reading client request header, then 408 (Request Time-out) error is returned to the client | +| nginx.http.clientMaxBodySize | int | `0` | The maximum allowed size of the client request body. If exceeded, the 413 (Request Entity Too Large) error is returned to the client. Note that unlike Nginx, we don't limit the body size by default (0 means no limit). | +| nginx.http.keepaliveTimeout | string | `"60s"` | timeout during which a keep-alive client connection will stay open on the server side | +| nginx.http.sendTimeout | string | `"10s"` | timeout for transmitting a response to the client, then the connection is closed | | nginx.workerConnections | string | `"10620"` | | | nginx.workerProcesses | string | `"auto"` | | | nginx.workerRlimitNofile | string | `"20480"` | |