feat: support for reading environment variables from yaml configuration files #5244#6505
Conversation
t/cli/test_yaml_config_variables.sh
Outdated
| # check supported environment variables in apisix.yaml | ||
|
|
||
| yaml_config_variables_clean_up() { | ||
| git checkout conf/config.yaml |
There was a problem hiding this comment.
We can use the original clean up like:
apisix/t/cli/test_serverless.sh
Lines 21 to 25 in 380f762
There was a problem hiding this comment.
Fixed. Please review it again.
| end | ||
| end | ||
|
|
||
| if default_conf.apisix.config_center == "yaml" then |
There was a problem hiding this comment.
Can we put this in apisix/core/config_yaml.lua?
There was a problem hiding this comment.
At first I wanted to put this in apisix/core/config_yaml.lua, but because the file loads ngx variables, it needs to be loaded in the openresty environment. Can't run in CLI mode, so we can't put this in apisix/core/config_yaml.lua
| @@ -0,0 +1,68 @@ | |||
| #!/usr/bin/env bash | |||
There was a problem hiding this comment.
Let's rename it to test_standalone.sh, so it can be used in other places later.
|
@spacewander @tokers Test file renamed.Please review it again. |
Co-authored-by: tzssangglass <tzssangglass@gmail.com>
What this PR does / why we need it:
Support for reading environment variables from yaml configuration files.
resolve #5244
Pre-submission checklist: