AlinsRan commented on issue #2782:
URL: 
https://github.com/apache/apisix-ingress-controller/issues/2782#issuecomment-4665882153

   During troubleshooting I found that the `auto` mode of 
`listener_port_match_mode` (#2703) is **not backward compatible** — it injects 
a `server_port` var into multi-listener routes by default, and the injected 
Gateway listener ports (`80`/`443`) never match `$server_port`, which is 
APISIX's actual listening port (`9080`/`9443` in the standard Helm deploy). 
This breaks existing deployments on upgrade with no config change.
   
   Two workarounds:
   
   **1. Disable the injection via config (recommended):**
   ```yaml
   listener_port_match_mode: off
   ```
   
   **2. Align the Gateway listener `port` with the data-plane port** (e.g. 
`9080`/`9443`):
   This makes the injected value equal `$server_port`, so matching succeeds 
even when the LoadBalancer exposes 80/443 externally (the LB remaps `80 → 
9080`, and `$server_port` reflects the internal port, not the external one). 
However, the Gateway listener port no longer represents the logical port 
clients connect to, which misrepresents the listener and can affect TLS / 
redirect logic that keys off 443. So this is a hack, not a clean fix — option 1 
is preferred.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to