-
Notifications
You must be signed in to change notification settings - Fork 2k
Description
Describe the bug
When we add a new listener on a reserved port (e.g. 9113), NIC correctly rejects the listener but also tears down all existing listeners
To Reproduce
Steps to reproduce the behavior:
- Deploy a TCP service in AKS / NIC with a listener in GlobalConfiguration and a TransportServer
- Edit GlobalConfiguration and add a second listener with a reserved port (e.g. 9113)
KubeEvent log entry: "GlobalConfiguration XXXXX is invalid and was rejected: spec.listeners[110].port: Forbidden: port 9113 is forbidden"
KubeEvent log entry: "Listener XXXX doesn't exist" - repeated for all working listeners
Expected behavior
I expected in this case that NGINX would reject the bad config and revert to last-good config, and the docs suggest this is what should happen:
https://docs.nginx.com/nginx-ingress-controller/configuration/global-configuration/globalconfiguration-resource/#:~:text=the%20Ingress%20Controller%20will%20ignore%20the%20new%20version
Your environment
- NIC 3.0.2
- K8s 1.25
- AKS
- NGINX open source
Additional context
We're using NGINX Ingress Controller 3.0.2 (NGINX 1.23.3) in AKS on a couple AKSUbuntu-2204gen2containerd-202309.06.0 nodes. We do regular helm release installs of a single-tenanted TCP & HTTP service for our customers. We had a P1 issue when we added a listener for a new customer to GlobalConfiguration and set the port number to 9113. NGINX rejected the change because 9113 is reserved for prometheus - which is fair enough. But in response it immediately deleted all other existing listeners, which broke 100 TransportServers and blocked access to 100 customers. Surely this is not the intended behaviour.
### Tasks
- [x] Design
- [x] Update documentation