Replies: 1 comment
-
See #11340 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Apisix supports the utilization of environment variables (${{VAR}}) within its configuration file. However, I have observed that these variables do not appear to take effect when defined in the default configuration file (config-default.yaml) and a custom configuration file is used through APISIX_PROFILE. The relevant code that governs this behavior is located here:
apisix/apisix/cli/file.lua
Line 235 in 6278ae0
I am unsure whether this behavior is intentional, particularly whether Apisix is intentionally designed not to read variables from the default YAML file. If this is indeed the case, I believe it would be valuable for Apisix to offer explanatory documentation clarifying the usage of variables. I have identified two places where environment variables are employed:
apisix/conf/config.yaml
Line 28 in 6278ae0
apisix/docs/zh/latest/admin-api.md
Line 70 in 6278ae0
If this behavior is not intentional, I would recommend extending the functionality to the default YAML file as well. Otherwise, it might appear peculiar that environment variables can only be employed in customized configuration files and not in the default configuration file.
Beta Was this translation helpful? Give feedback.
All reactions