Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Serverless Search] Remove unwanted alterting rule and connector types #162105

Merged
merged 5 commits into from
Jul 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions config/serverless.es.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,15 @@

## Disable APM and Uptime, enable Enterprise Search
xpack.apm.enabled: false

xpack.cloudSecurityPosture.enabled: false
xpack.infra.enabled: false
xpack.observability.enabled: false
xpack.securitySolution.enabled: false
xpack.serverless.observability.enabled: false
xpack.uptime.enabled: false
enterpriseSearch.enabled: false
monitoring.ui.enabled: false

## Enable the Serverless Search plugin
xpack.serverless.search.enabled: true
Expand All @@ -16,3 +23,6 @@ xpack.serverless.plugin.developer.projectSwitcher.currentType: 'search'

# Specify in telemetry the project type
telemetry.labels.serverless: search

# Alerts config
xpack.actions.enabledActionTypes: ['.email', '.index', '.slack', '.jira', '.webhook', '.teams']
1 change: 1 addition & 0 deletions x-pack/plugins/infra/common/plugin_config_types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ export interface InfraConfig {
group_by_page_size: number;
};
};
enabled: boolean;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this flag need to be exposed to the client public config for any reason or is it only necessary server side?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It’s only necessary on the server side, Kibana will pick it up and skip initializing the entire plug-in (server and client).

inventory: {
compositeSize: number;
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1901,6 +1901,7 @@ const createMockStaticConfiguration = (sources: any): InfraConfig => ({
logs: {
app_target: 'logs-ui',
},
enabled: true,
sources,
});

Expand Down
1 change: 1 addition & 0 deletions x-pack/plugins/infra/server/lib/sources/sources.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ const createMockStaticConfiguration = (sources: any): InfraConfig => ({
app_target: 'logs-ui',
},
sources,
enabled: true,
});

const createRequestContext = (savedObject?: SavedObject<unknown>) => {
Expand Down
1 change: 1 addition & 0 deletions x-pack/plugins/infra/server/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ import { mapSourceToLogView } from './utils/map_source_to_log_view';

export const config: PluginConfigDescriptor<InfraConfig> = {
schema: schema.object({
enabled: schema.boolean({ defaultValue: true }),
// Setting variants only allowed in the Serverless offering, otherwise always default `logs-ui` value
logs: schema.conditional(
schema.contextRef('serverless'),
Expand Down
1 change: 0 additions & 1 deletion x-pack/plugins/serverless_search/kibana.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
"grokdebugger",
"management",
"ml",
"observabilityShared",
"painlessLab",
"searchprofiler",
"security",
Expand Down
7 changes: 6 additions & 1 deletion x-pack/plugins/serverless_search/public/layout/nav.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,12 @@ const navigationTree: NavigationTreeDefinition = {
);
},
},
{ link: 'observability-overview:alerts' },
{
link: 'management:triggersActions',
title: i18n.translate('xpack.serverlessSearch.nav.alerts', {
defaultMessage: 'Alerts',
}),
},
],
},
{
Expand Down
3 changes: 1 addition & 2 deletions x-pack/plugins/serverless_search/public/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,10 @@ export class ServerlessSearchPlugin

public start(
core: CoreStart,
{ serverless, management, observabilityShared, cloud }: ServerlessSearchPluginStartDependencies
{ serverless, management, cloud }: ServerlessSearchPluginStartDependencies
): ServerlessSearchPluginStart {
serverless.setProjectHome('/app/elasticsearch');
serverless.setSideNavComponent(createComponent(core, { serverless, cloud }));
observabilityShared.setIsSidebarEnabled(false);
management.setupCardsNavigation({
enabled: true,
hideLinksTo: [appIds.MAINTENANCE_WINDOWS],
Expand Down
2 changes: 0 additions & 2 deletions x-pack/plugins/serverless_search/public/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import { ManagementSetup, ManagementStart } from '@kbn/management-plugin/public'
import { SecurityPluginStart } from '@kbn/security-plugin/public';
import { ServerlessPluginSetup, ServerlessPluginStart } from '@kbn/serverless/public';
import { SharePluginStart } from '@kbn/share-plugin/public';
import { ObservabilitySharedPluginStart } from '@kbn/observability-shared-plugin/public';

// eslint-disable-next-line @typescript-eslint/no-empty-interface
export interface ServerlessSearchPluginSetup {}
Expand All @@ -27,7 +26,6 @@ export interface ServerlessSearchPluginSetupDependencies {
export interface ServerlessSearchPluginStartDependencies {
cloud: CloudStart;
management: ManagementStart;
observabilityShared: ObservabilitySharedPluginStart;
security: SecurityPluginStart;
serverless: ServerlessPluginStart;
share: SharePluginStart;
Expand Down
1 change: 0 additions & 1 deletion x-pack/plugins/serverless_search/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,5 @@
"@kbn/ml-plugin",
"@kbn/management-cards-navigation",
"@kbn/core-elasticsearch-server",
"@kbn/observability-shared-plugin",
]
}