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/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"` | | diff --git a/charts/gateway/templates/configmap.yaml b/charts/gateway/templates/configmap.yaml index e6db6b3..f08866f 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: {{ .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 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: {}