config: add low priority env source
The usual environment configuration source is useful for parametrized run: ``` TT_MEMTX_MEMORY=<...> tarantool --name <...> --config <...> ``` However, sometimes a user may need to set a default value, which doesn't rewrite one that is provided in the configuration. Now, it is possible to do using the environment variables with the `_DEFAULT` suffix. ``` TT_MEMTX_MEMORY_DEFAULT=<...> tarantool --name <...> --config <...> ``` This feature may be especially useful for wrappers that run tarantool internally with some default paths for data directories, socket files, pid file. We likely will use it in the `tt` tool. Part of #8862 NO_DOC=added into https://github.com/tarantool/doc/issues/3544 manually
Showing
- changelogs/unreleased/config-low-priority-env-source.md 4 additions, 0 deletionschangelogs/unreleased/config-low-priority-env-source.md
- src/box/lua/config/init.lua 8 additions, 2 deletionssrc/box/lua/config/init.lua
- src/box/lua/config/source/env.lua 23 additions, 3 deletionssrc/box/lua/config/source/env.lua
- test/config-luatest/sources_test.lua 113 additions, 6 deletionstest/config-luatest/sources_test.lua
Loading
Please register or sign in to comment