config: support replicaset/group name templates
See the documentation request below for details about the feature. The template variables are substituted in three different places. * On deducing configuration of the current instance from the cluster configuration. * On calculation of URIs of replicaset peers to form `box.cfg({replication = <...>})` value. * On calculation of URIs of all cluster members for generation of `vshard.{router,storage}.cfg()` configuration. That's why we need a lot of testing code around this small feature. Part of #8862 @TarantoolBot document Title: config: support {{ replicaset_name }} and {{ group_name }} The declarative configuration supports `{{ instance_name }}` template variable from the beginning. Now, two more ones were added: `{{ replicaset_name }}` and `{{ group_name }}`. All the template variables are set according to the instance/replicaset/group topology from the given configuration. Example: NO_WRAP ```yaml console: socket: '{{ group_name }}/{{ replicaset_name }}/{{ instance_name }}.admin' groups: g: replicasets: r: instances: i: {} ``` NO_WRAP The admin console will be at `g/r/i.admin` for instance `i`.
Showing
- changelogs/unreleased/config-replicaset-group-name-templates.md 4 additions, 0 deletions...logs/unreleased/config-replicaset-group-name-templates.md
- src/box/lua/config/configdata.lua 26 additions, 9 deletionssrc/box/lua/config/configdata.lua
- test/config-luatest/vars_test.lua 307 additions, 0 deletionstest/config-luatest/vars_test.lua
Loading
Please register or sign in to comment