Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

options using byte-size unit "g" not honored after upgrading to 0.21.0 #3468

Closed
RutledgePaulV opened this issue Nov 26, 2018 · 3 comments · Fixed by #3474 or #3492
Closed

options using byte-size unit "g" not honored after upgrading to 0.21.0 #3468

RutledgePaulV opened this issue Nov 26, 2018 · 3 comments · Fixed by #3474 or #3492

Comments

@RutledgePaulV
Copy link

RutledgePaulV commented Nov 26, 2018

NGINX Ingress controller version:

  • 0.21.0

Kubernetes version:

  • v1.9.5

Environment:

  • OS: AWS/Centos7:
  • Kernel: RHEL 7.5

What happened:
We have a few custom settings for ingress in our configmap. After upgrading from 0.18.0 to 0.21.0 we discovered that the proxy-body-size wasn't having the desired effect (uploads were capped too low). I grepped the nginx.conf file from inside the container and found that client_max_body_size was set at "10m" despite our custom setting being "5g". I confirmed that some of the configmap settings were still being used (proxy-request-buffering: off). Our only change was to the ingress image tag.

What you expected to happen:
client_max_body_size to be set at 5g when my config map defines proxy-body-size: 5g

How to reproduce it (as minimally and precisely as possible):
Our config map:

data:
  custom-http-errors: 501,502,503,504,505,506,507,508,510,511
  load-balance: ewma
  proxy-body-size: 5g
  proxy-request-buffering: "off"

Our startup args:

      - args:
        - /nginx-ingress-controller
        - --sort-backends=true
        - --ingress-class=external-nginx
        - --default-backend-service=prod/fallback
        - --configmap=kube-system/nginx-configuration

We don't have per-ingress configuration options with annotations.

Anything else we need to know:
I'm happy to gather more diagnostic information if necessary. My hope is this is easily reproducible and related to recent changes but I haven't yet tried a minimal example. I was able to reproduce it in two different clusters.

@ElvinEfendi
Copy link
Member

@RutledgePaulV this seems to have been introduced as part of #3409. For now you can use k or m as a workaround.

If you look at logs you will see something like incorrect byte size format '5g', hence it will not be set.

cc @wayt

@RutledgePaulV
Copy link
Author

Thanks!

@wayt
Copy link
Contributor

wayt commented Nov 26, 2018

Indeed isValidByteSize don't support g https://github.com/kubernetes/ingress-nginx/blob/master/internal/ingress/controller/template/template.go#L769

I'll make a change for that.

@RutledgePaulV RutledgePaulV changed the title proxy-body-size from configmap not being honored after upgrading from 0.18.0 to 0.21.0 options using byte-size unit "g" not honored after upgrading from 0.18.0 to 0.21.0 Nov 26, 2018
@RutledgePaulV RutledgePaulV changed the title options using byte-size unit "g" not honored after upgrading from 0.18.0 to 0.21.0 options using byte-size unit "g" not honored after upgrading to 0.21.0 Nov 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants