Add support to enable/disable proxy buffering (#1998)

* Enable proxy buffering using configmap and annotation

* add documentation
This commit is contained in:
Anish Ramasekar 2018-01-29 08:43:55 -06:00 committed by Manuel Alejandro de Brito Fontes
parent 86889532aa
commit b020686599
8 changed files with 41 additions and 2 deletions

View file

@ -58,6 +58,7 @@ The following annotations are supported:
|[nginx.ingress.kubernetes.io/upstream-hash-by](#custom-nginx-upstream-hashing)|string|
|[nginx.ingress.kubernetes.io/upstream-vhost](#custom-nginx-upstream-vhost)|string|
|[nginx.ingress.kubernetes.io/whitelist-source-range](#whitelist-source-range)|CIDR|
|[nginx.ingress.kubernetes.io/proxy-buffering](#proxy-buffering)|string|
**Note:** all the values must be a string. In case of booleans or number it must be quoted.
@ -406,3 +407,15 @@ To use custom values in an Ingress rule define these annotation:
```yaml
nginx.ingress.kubernetes.io/proxy-body-size: 8m
```
### Proxy buffering
Enable or disable proxy buffering [`proxy_buffering`](http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_buffering).
By default proxy buffering is disabled in the nginx config.
To configure this setting globally for all Ingress rules, the `proxy-buffering` value may be set in the NGINX ConfigMap.
To use custom values in an Ingress rule define these annotation:
```yaml
nginx.ingress.kubernetes.io/proxy-buffering: "on"
```

View file

@ -126,6 +126,7 @@ The following table shows a configuration option's name, type, and the default v
|[limit‑rate](#limit-rate)|int|0|
|[limit‑rate‑after](#limit-rate-after)|int|0|
|[http‑redirect‑code](#http-redirect-code)|int|308|
|[proxy‑buffering](#proxy-buffering)|string|"off"|
## add-headers
@ -698,3 +699,7 @@ Default code is 308.
Why the default code is 308?
[RFC 7238](https://tools.ietf.org/html/rfc7238) was created to define the 308 (Permanent Redirect) status code that is similar to 301 (Moved Permanently) but it keeps the payload in the redirect. This is important if the we send a redirect in methods like POST.
## proxy-buffering
Enables or disables [buffering of responses from the proxied server](http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_buffering).