Skip to content

Commit ec666a7

Browse files
committed
config: add isolated option on the instance level
This commit just adds the option into the cluster configuration schema. Next commits will add the relevant logic. Part of tarantool#10796 NO_DOC=tarantool/doc#4632
1 parent ad6f4a3 commit ec666a7

File tree

4 files changed

+16
-0
lines changed

4 files changed

+16
-0
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
## feature/config
2+
3+
* Add `isolated` option for instances (gh-10796).

src/box/lua/config/instance_config.lua

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2475,6 +2475,12 @@ return schema.new('instance_config', schema.record({
24752475
type = 'string',
24762476
}),
24772477
}),
2478+
isolated = schema.scalar({
2479+
type = 'boolean',
2480+
default = false,
2481+
-- TODO: verify that the option is set in instance scope
2482+
-- or using an environment variable.
2483+
}),
24782484
}, {
24792485
-- This kind of validation cannot be implemented as the
24802486
-- 'validate' annotation of a particular schema node. There

test/config-luatest/cluster_config_schema_test.lua

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ local instance_config_fields = {
9292
'failover',
9393
'compat',
9494
'labels',
95+
'isolated',
9596
}
9697

9798
-- Verify that the fields of the given schema correspond to the
@@ -427,6 +428,7 @@ g.test_defaults = function()
427428
console_session_scope_vars = 'old',
428429
wal_cleanup_delay_deprecation = 'old',
429430
},
431+
isolated = false,
430432
}
431433

432434
-- Global defaults.

test/config-luatest/instance_config_schema_test.lua

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1764,3 +1764,8 @@ g.test_labels = function()
17641764

17651765
t.assert_equals(instance_config:apply_default({}).labels, nil)
17661766
end
1767+
1768+
g.test_isolated = function()
1769+
instance_config:validate({isolated = true})
1770+
t.assert_equals(instance_config:apply_default({}).isolated, false)
1771+
end

0 commit comments

Comments
 (0)