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

[Infra] Disable infra plugin in serverless projects #165289

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
1f2af52
Disable infra in serverless
crespocarlos Aug 31, 2023
8547218
Merge branch 'main' of github.com:elastic/kibana into 158925-disable-…
crespocarlos Aug 31, 2023
0f292c8
Merge branch 'main' into 158925-disable-infra-in-serverless-projets
kibanamachine Aug 31, 2023
64c74f1
Merge branch 'main' into 158925-disable-infra-in-serverless-projets
kibanamachine Aug 31, 2023
a488652
Merge branch 'main' into 158925-disable-infra-in-serverless-projets
kibanamachine Aug 31, 2023
c8708d0
Turn infra into optional dependency in APM
crespocarlos Aug 31, 2023
ba362fa
Merge branch 'main' into 158925-disable-infra-in-serverless-projets
kibanamachine Aug 31, 2023
f10960e
Merge branch 'main' into 158925-disable-infra-in-serverless-projets
kibanamachine Aug 31, 2023
b92d697
Merge branch 'main' into 158925-disable-infra-in-serverless-projets
kibanamachine Sep 1, 2023
54ed0a7
Merge branch 'main' into 158925-disable-infra-in-serverless-projets
kibanamachine Sep 4, 2023
138658a
Make infra plugin optional in APM server; Hide links to Infra in the UI
crespocarlos Sep 6, 2023
8e09ff4
Merge branch 'main' into 158925-disable-infra-in-serverless-projets
kibanamachine Sep 6, 2023
022130b
Merge branch 'main' into 158925-disable-infra-in-serverless-projets
kibanamachine Sep 7, 2023
c33ca08
Merge branch 'main' into 158925-disable-infra-in-serverless-projets
kibanamachine Sep 7, 2023
84ed203
Merge branch 'main' into 158925-disable-infra-in-serverless-projets
kibanamachine Sep 8, 2023
77f4914
Merge branch 'main' into 158925-disable-infra-in-serverless-projets
kibanamachine Sep 8, 2023
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
1 change: 1 addition & 0 deletions config/serverless.oblt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
## Disable plugins
enterpriseSearch.enabled: false
xpack.cloudSecurityPosture.enabled: false
xpack.infra.enabled: false
xpack.securitySolution.enabled: false
xpack.uptime.enabled: false
xpack.legacy_uptime.enabled: false
Expand Down
1 change: 1 addition & 0 deletions config/serverless.security.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
## Disable plugins
enterpriseSearch.enabled: false
xpack.apm.enabled: false
xpack.infra.enabled: false
xpack.observability.enabled: false
xpack.uptime.enabled: false
xpack.legacy_uptime.enabled: false
Expand Down
4 changes: 2 additions & 2 deletions x-pack/plugins/apm/kibana.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
"controls",
"embeddable",
"features",
"infra",
"logsShared",
"inspector",
"licensing",
Expand All @@ -41,6 +40,7 @@
"discover",
"fleet",
"fieldFormats",
"infra",
"home",
"ml",
"security",
Expand All @@ -49,7 +49,7 @@
"usageCollection",
"customIntegrations", // Move this to requiredPlugins after completely migrating from the Tutorials Home App
"licenseManagement",
"profiling",
"profiling"
],
"requiredBundles": [
"advancedSettings",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,7 @@ export function InstanceActionsMenu({
kuery,
onClose,
}: Props) {
const {
core,
infra: { locators },
} = useApmPluginContext();
const { core, infra } = useApmPluginContext();
const { data, status } = useInstanceDetailsFetcher({
serviceName,
serviceNodeName,
Expand Down Expand Up @@ -92,7 +89,7 @@ export function InstanceActionsMenu({
basePath: core.http.basePath,
onFilterByInstanceClick: handleFilterByInstanceClick,
metricsHref,
infraLocators: locators,
infraLocators: infra?.locators,
});

return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,67 +52,71 @@ export function getMenuSections({
? new Date(instanceDetails['@timestamp']).valueOf()
: undefined;
const infraMetricsQuery = getInfraMetricsQuery(instanceDetails['@timestamp']);
const infraNodeLocator = infraLocators.nodeLogsLocator;
const infraNodeLocator = infraLocators?.nodeLogsLocator;

const podActions: Action[] = [
{
key: 'podLogs',
label: i18n.translate(
'xpack.apm.serviceOverview.instancesTable.actionMenus.podLogs',
{ defaultMessage: 'Pod logs' }
),
href: infraNodeLocator.getRedirectUrl({
nodeId: podId!,
nodeType: 'pod',
time,
}),
condition: !!podId,
},
{
key: 'podMetrics',
label: i18n.translate(
'xpack.apm.serviceOverview.instancesTable.actionMenus.podMetrics',
{ defaultMessage: 'Pod metrics' }
),
href: getInfraHref({
app: 'metrics',
basePath,
path: `/link-to/pod-detail/${podId}`,
query: infraMetricsQuery,
}),
condition: !!podId,
},
];
const podActions: Action[] = infraNodeLocator
? [
{
key: 'podLogs',
label: i18n.translate(
'xpack.apm.serviceOverview.instancesTable.actionMenus.podLogs',
{ defaultMessage: 'Pod logs' }
),
href: infraNodeLocator?.getRedirectUrl({
nodeId: podId!,
nodeType: 'pod',
time,
}),
condition: !!podId,
},
{
key: 'podMetrics',
label: i18n.translate(
'xpack.apm.serviceOverview.instancesTable.actionMenus.podMetrics',
{ defaultMessage: 'Pod metrics' }
),
href: getInfraHref({
app: 'metrics',
basePath,
path: `/link-to/pod-detail/${podId}`,
query: infraMetricsQuery,
}),
condition: !!podId,
},
]
: [];

const containerActions: Action[] = [
{
key: 'containerLogs',
label: i18n.translate(
'xpack.apm.serviceOverview.instancesTable.actionMenus.containerLogs',
{ defaultMessage: 'Container logs' }
),
href: infraNodeLocator.getRedirectUrl({
nodeId: containerId!,
nodeType: 'container',
time,
}),
condition: !!containerId,
},
{
key: 'containerMetrics',
label: i18n.translate(
'xpack.apm.serviceOverview.instancesTable.actionMenus.containerMetrics',
{ defaultMessage: 'Container metrics' }
),
href: getInfraHref({
app: 'metrics',
basePath,
path: `/link-to/container-detail/${containerId}`,
query: infraMetricsQuery,
}),
condition: !!containerId,
},
];
const containerActions: Action[] = infraNodeLocator
? [
{
key: 'containerLogs',
label: i18n.translate(
'xpack.apm.serviceOverview.instancesTable.actionMenus.containerLogs',
{ defaultMessage: 'Container logs' }
),
href: infraNodeLocator?.getRedirectUrl({
nodeId: containerId!,
nodeType: 'container',
time,
}),
condition: !!containerId,
},
{
key: 'containerMetrics',
label: i18n.translate(
'xpack.apm.serviceOverview.instancesTable.actionMenus.containerMetrics',
{ defaultMessage: 'Container metrics' }
),
href: getInfraHref({
app: 'metrics',
basePath,
path: `/link-to/container-detail/${containerId}`,
query: infraMetricsQuery,
}),
condition: !!containerId,
},
]
: [];

const apmActions: Action[] = [
{
Expand Down
Loading