gjing1st opened a new pull request, #13746:
URL: https://github.com/apache/apisix/pull/13746

   ## Motivation
   `admin_listen` currently only accepts a single `{ip, port}` object.
   Passing an array is silently ignored — the CLI reads only the
   `.ip`/`.port` scalars and falls back to the default `0.0.0.0:9180`,
   so the Admin API can never listen on both IPv4 and IPv6 at once.
   (Background: #7972 asked about IPv6 on the control plane but was closed
   as not planned without a fix.)
   
   ## Solution
   - `apisix/cli/schema.lua`: `admin_listen` now accepts either the
     existing object or an array of `{ip, port}` (oneOf). Also fixed the
     schema property name from the wrong `listen` to `ip`.
   - `apisix/cli/ops.lua`: collect every address into a list; allow the
     same port to be reused across addresses of the same service (required
     for dual-stack); keep backward-compatible behavior for the object form.
   - `apisix/cli/ngx_tpl.lua`: emit one `listen` directive per address
     (both https and http branches).
   - `conf/config.yaml.example`: document the array / dual-stack syntax.
   
   ## Test
   Added a case in `t/cli/test_admin.sh`: with the array form,
   `make init` generates both `listen 0.0.0.0:9180;` and
   `listen [::]:9180;`.
   
   Resolves #13744
   


-- 
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