Skip to content

Commit

Permalink
[Serverless] Disable Migrate plugin (#157881)
Browse files Browse the repository at this point in the history
## Summary

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

Partially addresses #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 <[email protected]>
  • Loading branch information
ElenaStoeva and kibanamachine authored May 18, 2023
1 parent 731aaa4 commit 574d334
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 0 deletions.
1 change: 1 addition & 0 deletions config/serverless.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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,
};
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,6 @@

import { CloudDataMigrationPlugin } from './plugin';

export { config } from './config';

export const plugin = () => new CloudDataMigrationPlugin();
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
"@kbn/kibana-react-plugin",
"@kbn/i18n",
"@kbn/i18n-react",
"@kbn/config-schema",
"@kbn/core-plugins-server",
],
"exclude": [
"target/**/*",
Expand Down

0 comments on commit 574d334

Please sign in to comment.