kibana/test/node_roles_functional
Jean-Louis Leysens 5c15399ff4
[Migrations] Add migrator node role (#151978)
## Summary

Adds the `migrator` special role to the node roles config:


```yml
#            👇🏻 new
node.roles: ['migrator']
#             or
node.roles: ['background_tasks', 'ui']
#             or 
node.roles: ['*'] # this one is slightly weird now because it actually excludes 'migrator' so it is not truly "all roles", but "all combinable roles"...
```

## How to test

Start Kibana locally and add `node.roles: ['migrator']` to the
`kibana.dev.yml`. Kibana should start normally and log:

```
[2023-02-23T12:08:54.123+01:00][INFO ][node] Kibana process configured with roles: [migrator]
```

Note: this role currently does not do anything. This PR just adds the
ability to configure it.

Partially addresses https://github.com/elastic/kibana/issues/150295

## Slight improvement to error messages

When specifying known, accepted values but combining with either
`migrator` or `*` you will get a message like:

```
[config validation of [node].roles]: wildcard ("*") cannot be used with other roles or specified more than once
```

---------

Co-authored-by: Luke Elmers <lukeelmers@gmail.com>
2023-02-27 06:49:31 -07:00
..
plugins/core_plugin_initializer_context [packages] migrate all plugins to packages (#148130) 2023-02-08 21:06:50 -06:00
services
test_suites [Migrations] Add migrator node role (#151978) 2023-02-27 06:49:31 -07:00
all.config.ts
background_tasks.config.ts Background task instances wait for another instance to complete the migration (#143135) 2022-11-02 06:17:02 -07:00
ui.config.ts