[Serverless] Disable Migrate plugin (#157881)

## Summary

This PR makes the Migrate plugin disable-able for serverless.

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

**How to test:**

1. Start Elasticsearch with `yarn es snapshot` and Kibana with yarn
`serverless-{mode}` where `{mode}` can be `es`, `security`, or `oblt`.
2. Verify that the Migrate plugin doesn't show up in the nav bar and its
path (`management/data/migrate_data`) leads to the Stack Management
landing page.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
This commit is contained in:
Elena Stoeva 2023-05-18 17:31:06 +01:00 committed by GitHub
parent 731aaa4045
commit 574d334f07
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 24 additions and 0 deletions

View file

@ -17,6 +17,7 @@ xpack.license_management.enabled: false
# Other disabled plugins
#xpack.canvas.enabled: false #only disabable in dev-mode
xpack.reporting.enabled: false
xpack.cloud_integrations.data_migration.enabled: false
# Enforce restring access to internal APIs see https://github.com/elastic/kibana/issues/151940
# server.restrictInternalApis: true

View file

@ -0,0 +1,19 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0; you may not use this file except in compliance with the Elastic License
* 2.0.
*/
import { schema, TypeOf } from '@kbn/config-schema';
import { PluginConfigDescriptor } from '@kbn/core-plugins-server';
const configSchema = schema.object({
enabled: schema.boolean({ defaultValue: true }),
});
export type CloudDataMigrationConfig = TypeOf<typeof configSchema>;
export const config: PluginConfigDescriptor<CloudDataMigrationConfig> = {
schema: configSchema,
};

View file

@ -7,4 +7,6 @@
import { CloudDataMigrationPlugin } from './plugin';
export { config } from './config';
export const plugin = () => new CloudDataMigrationPlugin();

View file

@ -19,6 +19,8 @@
"@kbn/kibana-react-plugin",
"@kbn/i18n",
"@kbn/i18n-react",
"@kbn/config-schema",
"@kbn/core-plugins-server",
],
"exclude": [
"target/**/*",