-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Open
Labels
bugSomething isn't workingSomething isn't workingenhancementNew feature or requestNew feature or request
Description
Current Behavior
APISIX generates and writes a configuration file when the Admin API key is empty, which causes the configuration file to be exported from memory and encoded in YAML and then written.
https://github.com/apache/apisix/blob/master/apisix/core/id.lua#L124-L133
During this process, comments in the configuration file will be lost, and some will be generated containing ...
ending, which will result in an error on the next startup.
Expected Behavior
Configuration files should not be rewritten in any way. If the Admin API key is empty, we need to write it to the logs and also warn the user there that you need to configure your own key, otherwise every reboot will cause the key to change.
Error Logs
No need
Steps to Reproduce
- Set
deployment.admin.admin_key
in the configuration file to the empty string - Start APISIX
- Check config.yaml
Environment
- APISIX version (run
apisix version
): master - Operating system (run
uname -a
): unrelated - OpenResty / Nginx version (run
openresty -V
ornginx -V
): unrelated - etcd version, if relevant (run
curl http://127.0.0.1:9090/v1/server_info
): unrelated - APISIX Dashboard version, if relevant: unrelated
- Plugin runner version, for issues related to plugin runners: unrelated
- LuaRocks version, for installation issues (run
luarocks --version
): unrelated
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingenhancementNew feature or requestNew feature or request
Type
Projects
Status
📋 Backlog