Open
Description
Version
3.7.1
What Kubernetes platforms are you running on?
Openshift
Steps to reproduce
- create a virtualserver with a route with splits and upstreams with client-max-body-size. example:
apiVersion: k8s.nginx.org/v1
kind: VirtualServer
metadata:
name: splits-vs
namespace: vs-namspace
spec:
host: splits.com
upstreams:
- name: upstream1
service: svc1
port: 80
client-max-body-size: 15M
- name: upstream2
service: svc2
port: 80
client-max-body-size: 15M
routes:
- path: /
splits:
- weight: 50
action:
pass: upstream1
- weight: 50
action:
pass: upstream2
- make a request to the host with a body size that should be allowed by the configuration. for example try a post request with a 10MB file in the body.
- should get a "413 Request Entity Too Large response" that indicates the client-max-body-size option was ignored.
Temporary Solution
I was able to overcome this issue by adding:
server-snippets: |
client_max_body_size 15M;
however we try to avoid using snippets as much as possible and there is no apparent reason on why it's not working without the snippet.