[Saved Objects] Remove runOnRoles: ['ui'] from serverless config (#164968)

## Summary

Enable ZDT migrations to run on `migrator` node roles (the default).

### Risk Matrix

Delete this section if it is not applicable to this PR.

Before closing this PR, invite QA, stakeholders, and other developers to
identify risks that should be tested prior to the change/feature
release.

When forming the risk matrix, consider some of the following examples
and how they may potentially impact the change:

| Risk | Probability | Severity | Mitigation/Notes |

|---------------------------|-------------|----------|-------------------------|
| Issues when rolling out Kibana's | Med. | Low | It's possible this
change could lead to interruption in internal Elastic environments |
This commit is contained in:
Jean-Louis Leysens 2023-08-30 11:58:16 +02:00 committed by GitHub
parent 903a5111e6
commit 5739f1f561
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 38 additions and 18 deletions

View file

@ -17,11 +17,8 @@ migrations.algorithm: zdt
# A longer migration time is acceptable due to the ZDT algorithm.
migrations.batchSize: 250
# temporarily allow to run the migration on UI nodes
# until the controller is able to spawn the migrator job/pod
migrations.zdt:
metaPickupSyncDelaySec: 5
runOnRoles: ['ui']
# Ess plugins
xpack.securitySolutionEss.enabled: false

View file

@ -113,22 +113,44 @@ const getServerlessESClient = () => {
});
};
const defaults = {
server: {
restrictInternalApis: true,
versioned: {
versionResolution: 'newest',
strictClientVersionCheck: false,
const getServerlessDefault = () => {
return {
server: {
restrictInternalApis: true,
versioned: {
versionResolution: 'newest',
strictClientVersionCheck: false,
},
},
},
migrations: {
algorithm: 'zdt',
},
elasticsearch: {
serviceAccountToken: 'BEEF',
},
migrations: {
algorithm: 'zdt',
zdt: {
runOnRoles: ['ui'],
},
},
logging: {
loggers: [
{
name: 'root',
level: 'error',
appenders: ['console'],
},
{
name: 'elasticsearch.deprecation',
level: 'all',
appenders: ['deprecation'],
},
],
appenders: {
deprecation: { type: 'console', layout: { type: 'json' } },
console: { type: 'console', layout: { type: 'pattern' } },
},
},
};
};
function createServerlessKibana(settings = {}, cliArgs: Partial<CliArgs> = {}) {
return createRoot(defaultsDeep(settings, defaults), { ...cliArgs, serverless: true });
return createRoot(defaultsDeep(settings, getServerlessDefault()), {
...cliArgs,
serverless: true,
});
}

View file

@ -75,6 +75,7 @@ export default async () => {
`--server.restrictInternalApis=true`,
`--server.port=${servers.kibana.port}`,
'--status.allowAnonymous=true',
`--migrations.zdt.runOnRoles=${JSON.stringify(['ui'])}`,
// We shouldn't embed credentials into the URL since Kibana requests to Elasticsearch should
// either include `kibanaServerTestUser` credentials, or credentials provided by the test
// user, or none at all in case anonymous access is used.