This is an automated email from the ASF dual-hosted git repository.

kayx23 pushed a commit to branch fix/ingress-listener-port-match-default
in repository https://gitbox.apache.org/repos/asf/apisix-helm-chart.git

commit bc76afaaaa737483b7605c7311f7e8860e93806f
Author: kayx23 <[email protected]>
AuthorDate: Wed Aug 26 17:24:16 2026 +0800

    fix(ingress-controller): align listener port matching default
---
 .github/workflows/ci.yaml                                 |  3 +++
 charts/apisix-ingress-controller/Chart.yaml               |  2 +-
 charts/apisix-ingress-controller/README.md                |  4 +++-
 charts/apisix-ingress-controller/README.md.gotmpl         |  2 ++
 charts/apisix-ingress-controller/templates/configmap.yaml |  2 +-
 charts/apisix-ingress-controller/values.yaml              |  3 ++-
 test/ingress-controller-config-defaults.sh                | 13 +++++++++++++
 7 files changed, 25 insertions(+), 4 deletions(-)

diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml
index e2f15d3..f73ca39 100644
--- a/.github/workflows/ci.yaml
+++ b/.github/workflows/ci.yaml
@@ -39,6 +39,9 @@ jobs:
                   --charts charts/apisix-dashboard \
                   --charts charts/apisix-ingress-controller'
 
+      - name: Test ingress controller rendered defaults
+        run: bash test/ingress-controller-config-defaults.sh
+
       - name: fix permissions
         run: |
           sudo mkdir -p $HOME/.kube
diff --git a/charts/apisix-ingress-controller/Chart.yaml 
b/charts/apisix-ingress-controller/Chart.yaml
index 6863b4b..93ed62b 100644
--- a/charts/apisix-ingress-controller/Chart.yaml
+++ b/charts/apisix-ingress-controller/Chart.yaml
@@ -24,7 +24,7 @@ keywords:
   - nginx
   - crd
 type: application
-version: 1.3.0
+version: 1.3.1
 appVersion: 2.2.0
 sources:
   - https://github.com/apache/apisix-helm-chart
diff --git a/charts/apisix-ingress-controller/README.md 
b/charts/apisix-ingress-controller/README.md
index e60da38..77216aa 100644
--- a/charts/apisix-ingress-controller/README.md
+++ b/charts/apisix-ingress-controller/README.md
@@ -43,6 +43,8 @@ _See [helm 
uninstall](https://helm.sh/docs/helm/helm_uninstall/) for command doc
 
 ## Upgrading Chart
 
+Chart 1.3.1 changes the default `config.listenerPortMatchMode` from `auto` to 
`off`, matching the APISIX Ingress Controller 2.2.0 default. This avoids adding 
`server_port` route predicates when Kubernetes Service ports differ from the 
ports on which APISIX accepts traffic. If your routes rely on listener-port 
matching, set `config.listenerPortMatchMode` to `auto` or `explicit` before 
upgrading.
+
 ```console
 helm upgrade [RELEASE_NAME] [CHART] --install
 ```
@@ -121,7 +123,7 @@ The same for container level, you need to set:
 | config.leaderElection.leaseDuration | string | `"15s"` |  |
 | config.leaderElection.renewDeadline | string | `"10s"` |  |
 | config.leaderElection.retryPeriod | string | `"2s"` |  |
-| config.listenerPortMatchMode | string | `"auto"` |  |
+| config.listenerPortMatchMode | string | `"off"` | Controls `server_port` 
route matching from Gateway listener ports. Supported values are `off`, `auto`, 
and `explicit`. |
 | config.logLevel | string | `"info"` |  |
 | config.metricsAddr | string | `":8080"` |  |
 | config.probeAddr | string | `":8081"` |  |
diff --git a/charts/apisix-ingress-controller/README.md.gotmpl 
b/charts/apisix-ingress-controller/README.md.gotmpl
index 3a3999c..700a349 100644
--- a/charts/apisix-ingress-controller/README.md.gotmpl
+++ b/charts/apisix-ingress-controller/README.md.gotmpl
@@ -43,6 +43,8 @@ _See [helm 
uninstall](https://helm.sh/docs/helm/helm_uninstall/) for command doc
 
 ## Upgrading Chart
 
+Chart 1.3.1 changes the default `config.listenerPortMatchMode` from `auto` to 
`off`, matching the APISIX Ingress Controller 2.2.0 default. This avoids adding 
`server_port` route predicates when Kubernetes Service ports differ from the 
ports on which APISIX accepts traffic. If your routes rely on listener-port 
matching, set `config.listenerPortMatchMode` to `auto` or `explicit` before 
upgrading.
+
 ```console
 helm upgrade [RELEASE_NAME] [CHART] --install
 ```
diff --git a/charts/apisix-ingress-controller/templates/configmap.yaml 
b/charts/apisix-ingress-controller/templates/configmap.yaml
index 4d2833d..3600669 100644
--- a/charts/apisix-ingress-controller/templates/configmap.yaml
+++ b/charts/apisix-ingress-controller/templates/configmap.yaml
@@ -35,7 +35,7 @@ data:
     secure_metrics: {{ .Values.config.secureMetrics | default false }}
     exec_adc_timeout: {{ .Values.config.execADCTimeout | default "15s" }}
     disable_gateway_api: {{ .Values.config.disableGatewayAPI | default false }}
-    listener_port_match_mode: {{ .Values.config.listenerPortMatchMode | 
default "auto" }}
+    listener_port_match_mode: {{ .Values.config.listenerPortMatchMode | 
default "off" }}
     provider:
       type: {{ .Values.config.provider.type | default "apisix" }}
       sync_period: {{ .Values.config.provider.syncPeriod | default "1s" }}
diff --git a/charts/apisix-ingress-controller/values.yaml 
b/charts/apisix-ingress-controller/values.yaml
index 519e375..9d936fc 100644
--- a/charts/apisix-ingress-controller/values.yaml
+++ b/charts/apisix-ingress-controller/values.yaml
@@ -92,7 +92,8 @@ config:
   secureMetrics: false
   execADCTimeout: "15s"
   disableGatewayAPI: false
-  listenerPortMatchMode: "auto"
+  # -- Controls `server_port` route matching from Gateway listener ports. 
Supported values are `off`, `auto`, and `explicit`.
+  listenerPortMatchMode: "off"
   provider:
     type: "apisix"
     syncPeriod: "1m"
diff --git a/test/ingress-controller-config-defaults.sh 
b/test/ingress-controller-config-defaults.sh
new file mode 100644
index 0000000..e310c2a
--- /dev/null
+++ b/test/ingress-controller-config-defaults.sh
@@ -0,0 +1,13 @@
+#!/usr/bin/env bash
+
+set -euo pipefail
+
+chart="charts/apisix-ingress-controller"
+
+default_config=$(helm template test "$chart" --show-only 
templates/configmap.yaml)
+grep -q '^    listener_port_match_mode: off$' <<<"$default_config"
+
+auto_config=$(helm template test "$chart" \
+  --show-only templates/configmap.yaml \
+  --set config.listenerPortMatchMode=auto)
+grep -q '^    listener_port_match_mode: auto$' <<<"$auto_config"

Reply via email to