fix(apisix): quote IP values in configmap so IPv6 addresses do not break YAML#963
Open
SAY-5 wants to merge 1 commit intoapache:masterfrom
Open
fix(apisix): quote IP values in configmap so IPv6 addresses do not break YAML#963SAY-5 wants to merge 1 commit intoapache:masterfrom
SAY-5 wants to merge 1 commit intoapache:masterfrom
Conversation
…eak YAML The ConfigMap template emits `ip:` lines and allow_admin entries without quoting the user-supplied value. For IPv4 this works, but values like `[::]`, `::/0`, or `[::1]` are parsed by YAML as flow sequences or bare colons, so the rendered config fails to load and apisix will not start. Pipe each templated IP through Helm's `quote` filter so IPv6 values round-trip correctly. Covers admin.ip and admin.allow.ipList (which the issue calls out) plus control.service.ip and apisix.status.ip, which have the same bug. Fixes apache#920 Signed-off-by: SAY-5 <SAY-5@users.noreply.github.com>
Baoyuantop
approved these changes
Apr 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
charts/apisix/templates/configmap.yamlrendersip:values andallow_adminlist items without quoting. For IPv4 this is fine, but when the value contains
YAML-flow characters the rendered file becomes invalid YAML:
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
quotefilter so IPv6 valuesrender as regular YAML strings regardless of format (
::,[::],::/0,fe80::/10, etc). Four locations incharts/apisix/templates/configmap.yaml:admin.admin_listen.ipfrom.Values.apisix.admin.ip(called out in the issue)admin.allow_adminlist items from.Values.apisix.admin.allow.ipList(called out in the issue)control.ipfrom.Values.control.service.ip(same bug, same chart)status.ipfrom.Values.apisix.status.ip(same bug, same chart)IPv4 values are unaffected because YAML treats a quoted
"127.0.0.1"identicallyto the bare form, and each affected key is already documented as a string on the
apisix side.
Fixes #920