Baoyuantop commented on issue #12932:
URL: https://github.com/apache/apisix/issues/12932#issuecomment-3798006834
This automatic type conversion was initially designed in #2743 to enable
users to configure numeric system parameters (e.g., `worker_rlimit_nofile`) and
boolean parameters (e.g., `enable_admin`) via environment variables. This
design targeted core APISIX configuration items within `config.yaml`.
In a subsequent extension (#6505), to address user requests (#5244), the
same `resolve_conf_var` function was directly reused in the parsing of
apisix.yaml for standalone mode. However, this failed to account for the
differing usage scenarios between the two contexts. This resulted in
environment variables like “${{VAR}}” in standalone mode apisix.yaml being
automatically converted to numeric types when their values were pure numeric
strings (e.g., “356002209726529540”).
To address this issue, I recommend adding an optional parameter to
`resolve_conf_var` to control whether automatic type conversion occurs, and
disabling automatic type conversion when processing `apisix.yaml`.
--
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]