-
Notifications
You must be signed in to change notification settings - Fork 403
Closed
Copy link
Labels
Description
Version: all existing tarantool 3.x (tested on 3.2.0).
Config:
config:
context:
title:
from: env
env: TITLE
process:
title: '{{ context.title }}'
app:
cfg:
title: '{{ context.title }}'
roles_cfg:
foo:
title: '{{ context.title }}'
groups:
g:
replicasets:
r:
instances:
i-001: {}Test:
$ TITLE=xxx tarantool -i --name i-001 --config config.yaml
tarantool> config = require('config')
tarantool> config:get('process.title')
---
- xxx
...
tarantool> config:get('app.cfg.title')
---
- '{{ context.title }}'
...
tarantool> config:get('roles_cfg.foo.title')
---
- '{{ context.title }}'
...And the same for built-in replacements
process:
title: '{{ instance_name }}'
app:
cfg:
title: '{{ instance_name }}'
roles_cfg:
foo:
title: '{{ instance_name }}'
groups:
g:
replicasets:
r:
instances:
i-001: {}$ tarantool -i --name i-001 --config config.yaml
tarantool> config = require('config')
tarantool> config:get('process.title')
---
- i-001
...
tarantool> config:get('app.cfg.title')
---
- '{{ instance_name }}'
...
tarantool> config:get('roles_cfg.foo.title')
---
- '{{ instance_name }}'
...The reason is that app.cfg.<...> and roles_cfg.<...> have any type and this type is not traversed down by the <schema object>:map() method.
| return self:map(iconfig, apply_vars_f, vars) |
Also tracked in TNTP-372
Reactions are currently unavailable