Skip to content

fix: default listenerPortMatchMode to off in apisix and ingress-controller charts#976

Open
AlinsRan wants to merge 2 commits into
apache:masterfrom
AlinsRan:fix/listener-port-match-default-off
Open

fix: default listenerPortMatchMode to off in apisix and ingress-controller charts#976
AlinsRan wants to merge 2 commits into
apache:masterfrom
AlinsRan:fix/listener-port-match-default-off

Conversation

@AlinsRan

@AlinsRan AlinsRan commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

What this PR does

Changes the default of listenerPortMatchMode from auto to off for both the apisix-ingress-controller chart and the umbrella apisix chart.

Why

auto mode (introduced in apache/apisix-ingress-controller#2703, shipped in 2.1.0) injects a server_port route var into any route matching multiple listener ports. The injected value is the Gateway listener port (e.g. 80/443), but the APISIX server_port variable reflects the port the data plane actually listens on (e.g. 9080/9443 — the Service maps 80/443 → 9080/9443). The two never match, so every multi-listener route returns 404 after upgrading.

See apache/apisix-ingress-controller#2782 for the full analysis.

Changes

charts/apisix-ingress-controller

  • values.yaml: config.listenerPortMatchMode now defaults to "off" (with an explanatory comment).
  • templates/configmap.yaml: template default updated to off.
  • README.md: regenerated default value.
  • Chart.yaml: version 1.2.01.2.1.

charts/apisix (umbrella)

  • values.yaml: pins ingress-controller.config.listenerPortMatchMode: "off" so bundled deployments inherit the safe default.
  • Chart.yaml: version 2.14.12.14.2.

Rendered output verified (listener_port_match_mode: off) and helm lint passes. Users who run APISIX with node_listen aligned to their Gateway listener ports can still opt back in via config.listenerPortMatchMode: auto/explicit.

Note: the upstream controller default is also being changed to off in apache/apisix-ingress-controller#2784. This chart change protects existing chart users immediately, independent of the controller release cycle.

@AlinsRan AlinsRan changed the title fix: default ingress-controller listenerPortMatchMode to off fix: default listenerPortMatchMode to off in apisix and ingress-controller charts Jun 10, 2026
Foo Bar added 2 commits June 10, 2026 10:43
The auto mode (apisix-ingress-controller#2703, shipped in 2.1.0) injects
a server_port route var derived from the Gateway listener port (e.g.
80/443), but APISIX server_port reflects the data-plane listening port
(e.g. 9080/9443), so routes 404 after upgrade. Default to off so
port-var injection is opt-in.
… off

Mirror the subchart default change in the umbrella apisix chart so
bundled deployments also default port-var injection to off.
@AlinsRan AlinsRan force-pushed the fix/listener-port-match-default-off branch from ab45d84 to 1cdc185 Compare June 10, 2026 02:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant