Closed
Description
Describe the bug
When configuring rate-limit scaling at master ingress, the rate-limit calculation based of replica count doesn't works (works fine with standard ingress, VS and VSRs)
To Reproduce
- Install edge build of NIC
- Configure mergable ingress example with rate-limit and scaling
- check directives inside the pod.
~/nginx/kubernetes-ingress/charts/nginx-ingress on tests/rate-limit-scaling ● λ k get ing
NAME CLASS HOSTS ADDRESS PORTS AGE
cafe-ingress-coffee-minion nginx cafe.example.com 35.240.31.112 80 71s
cafe-ingress-master nginx cafe.example.com 35.240.31.112 80, 443 72s
cafe-ingress-tea-minion nginx cafe.example.com 35.240.31.112 80 71s
~/nginx/kubernetes-ingress/charts/nginx-ingress on tests/rate-limit-scaling ● λ k describe ing cafe-ingress-master
Name: cafe-ingress-master
Labels: <none>
Namespace: default
Address: 35.240.31.112
Ingress Class: nginx
Default backend: <default>
TLS:
cafe-secret terminates cafe.example.com
Rules:
Host Path Backends
---- ---- --------
* * <default>
Annotations: nginx.org/limit-req-key: ${binary_remote_addr}
nginx.org/limit-req-rate: 50r/s
nginx.org/limit-req-scale: true
nginx.org/limit-req-zone-size: 10M
nginx.org/mergeable-ingress-type: master
~/nginx/kubernetes-ingress/charts/nginx-ingress on tests/rate-limit-scaling ● λ k get po
NAME READY STATUS RESTARTS AGE
test-release-nginx-ingress-controller-79754fc5bd-9qnfr 1/1 Running 0 121m
test-release-nginx-ingress-controller-79754fc5bd-hrgp9 1/1 Running 0 121m
test-release-nginx-ingress-controller-79754fc5bd-wdhc5 1/1 Running 0 121m
limit_req_zone ${binary_remote_addr} zone=default/cafe-ingress-coffee-minion:10M rate=50r/s;
limit_req_zone ${binary_remote_addr} zone=default/cafe-ingress-tea-minion:10M rate=50r/s;
Expected behavior
- It should be divided based on number of replicas
limit_req_zone ${binary_remote_addr} zone=default/cafe-ingress:10M rate=16r/s;
Your environment
- Version of the Ingress Controller - edge
- Version of Kubernetes - 1.29
- Kubernetes platform (e.g. Mini-kube or GCP) - GKE
- Using NGINX or NGINX Plus - OSS
Additional context
Add any other context about the problem here. Any log files you want to share.