SAY-5 opened a new pull request, #963:
URL: https://github.com/apache/apisix-helm-chart/pull/963

   ### Problem
   
   `charts/apisix/templates/configmap.yaml` renders `ip:` values and 
`allow_admin`
   list items without quoting. For IPv4 this is fine, but when the value 
contains
   YAML-flow characters the rendered file becomes invalid YAML:
   
   ```yaml
   # e.g. apisix.admin.ip = "[::]"
   admin_listen:
     ip: [::]                     # parses as an empty flow sequence, not a 
string
   
   # e.g. allow_admin contains "::/0"
   allow_admin:
     - ::/0                       # treated as a mapping-style token, not a 
string
   ```
   
   apisix then fails to start, or picks up a different value than the operator
   supplied. This is the failure mode reported in #920.
   
   ### Fix
   
   Pipe the affected templated values through the `quote` filter so IPv6 values
   render as regular YAML strings regardless of format (`::`, `[::]`, `::/0`,
   `fe80::/10`, etc). Four locations in 
`charts/apisix/templates/configmap.yaml`:
   
   - `admin.admin_listen.ip`  from `.Values.apisix.admin.ip` (called out in the 
issue)
   - `admin.allow_admin` list items  from `.Values.apisix.admin.allow.ipList` 
(called out in the issue)
   - `control.ip`  from `.Values.control.service.ip` (same bug, same chart)
   - `status.ip`  from `.Values.apisix.status.ip` (same bug, same chart)
   
   IPv4 values are unaffected because YAML treats a quoted `"127.0.0.1"` 
identically
   to the bare form, and each affected key is already documented as a string on 
the
   apisix side.
   
   Fixes #920
   


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