Ingress-nginx: Bug: Setting proxy-body-size not working globally

Created on 12 Jun 2018  路  5Comments  路  Source: kubernetes/ingress-nginx


What keywords did you search in NGINX Ingress controller issues before filing this one? proxy-body-size, client-max-body-size,


Is this a BUG REPORT or FEATURE REQUEST? (choose one): BUG

NGINX Ingress controller version: 0.15.0

Kubernetes version (use kubectl version): v1.9.7

Environment:

  • Cloud provider or hardware configuration: AWS
  • OS (e.g. from /etc/os-release): Debian9
  • Kernel (e.g. uname -a):
  • Install tools:
  • Others:

What happened: Adding the key proxy-body-size to a configmap loaded via the Ingress controller via the flag --configmap gets set at the / root server block.

What you expected to happen: This should have set the client_max_body_size value for all locations/servers in the NGINX configuration

How to reproduce it (as minimally and precisely as possible): Add the key proxy-body-size to a configmap, pass it via the --configmap argument to the ingress controller.

Anything else we need to know: If I set the annotation nginx.ingress.kubernetes.io/proxy-body-size on an individual Ingress rule, it adds it to that rule.

Most helpful comment

you should set proxy-body-size in your configmap not client-max-body-size.

https://github.com/kubernetes/ingress-nginx/blob/nginx-0.15.0/docs/user-guide/nginx-configuration/configmap.md#proxy-body-size

All 5 comments

/kind bug

you should set proxy-body-size in your configmap not client-max-body-size.

https://github.com/kubernetes/ingress-nginx/blob/nginx-0.15.0/docs/user-guide/nginx-configuration/configmap.md#proxy-body-size

Correct @miaoshixuan, I updated the issue to reflect that, an example configmap is below:
```kind: ConfigMap
apiVersion: v1
metadata:
name: nginx-configuration
namespace: ingress-nginx
labels:
app: ingress-nginx
data:
use-proxy-protocol: "false"
ssl-redirect: "true"
enable-vts-status: "true"
custom-http-errors: 404,502,503,504
proxy-set-headers: "ingress-nginx/custom-headers"
proxy-body-size: "10m"

This appears to be working now, not sure if it took longer than expected to load or I had an improper configuration early on. Closing bug.

/remove-kind bug

Was this page helpful?
0 / 5 - 0 ratings