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

[Inventory] Redirect k8s entities to their corresponding detail view #196142

Closed
crespocarlos opened this issue Oct 14, 2024 · 1 comment · Fixed by #197222
Closed

[Inventory] Redirect k8s entities to their corresponding detail view #196142

crespocarlos opened this issue Oct 14, 2024 · 1 comment · Fixed by #197222
Assignees
Labels
enhancement New value added to drive a business result Team:obs-ux-infra_services Observability Infrastructure & Services User Experience Team

Comments

@crespocarlos
Copy link
Contributor

crespocarlos commented Oct 14, 2024

Summary

Important

  • EEM is not yet providing these entity types. We'll have to rely on mock data, storybook, and synthtrace

While there isn't a Detail View for kubernetes entities, we want to link users to dashboards when applicable. Kubernetes integration for ECS ships dashboards that the Inventory can use to link entities to their corresponding dashboard. For the moment, Otel entites won't have the same functionality.

Image

ECS
The following ECS k8s entities will redirect to the dashboards below.

Dashboard Dashboard id
Cluster kubernetes-f4dc26db-1b53-4ea2-a78b-1bfab8ea267c
CronJob kubernetes-0a672d50-bcb1-11ec-b64f-7dd6e8e82013
DaemonSet kubernetes-85879010-bcb1-11ec-b64f-7dd6e8e82013
Deployment kubernetes-5be46210-bcb1-11ec-b64f-7dd6e8e82013
Job kubernetes-9bf990a0-bcb1-11ec-b64f-7dd6e8e82013
Node kubernetes-b945b7b0-bcb1-11ec-b64f-7dd6e8e82013
Pod kubernetes-3d4d9290-bcb1-11ec-b64f-7dd6e8e82013
ReplicaSet it doesn't have a dashboard; show entity name as plain text
StatefulSet kubernetes-21694370-bcb2-11ec-b64f-7dd6e8e82013

Important

  • The dashboards above are managed saved objects, their id won't change. For simplicity, when passing the dashboardId to dashboardLocator, they can be hardcoded
  • Kubernetes integration package needs to be installed to have the dashboards in the local env.

Otel
Aside from K8s Cluster, other otel k8s entities will show the entity name as plain text, as the K8s Otel integration package doesn't provide entity-specific dashboards yet.

Dashboard Dashboard id
Cluster kubernetes_otel-cluster-overview

AC

  • ECS entities, but ReplicaSet, will redirect to their corresponding dashboard
  • dashboardLocator will be used for the redirection
  • The dashboard will be filtered by the entity.id
  • The Inventory delegates to the Dashboards UI the responsibility for checking if a dashboard is installed
  • Otel K8s entity names are displayed as plain text
  • ECS K8sReplicaSet entity names are displayed as plain text
@crespocarlos crespocarlos added the Team:obs-ux-infra_services Observability Infrastructure & Services User Experience Team label Oct 14, 2024
@elasticmachine
Copy link
Contributor

Pinging @elastic/obs-ux-infra_services-team (Team:obs-ux-infra_services)

@crespocarlos crespocarlos added the needs-refinement A reason and acceptance criteria need to be defined for this issue label Oct 14, 2024
@crespocarlos crespocarlos self-assigned this Oct 14, 2024
@crespocarlos crespocarlos added the enhancement New value added to drive a business result label Oct 14, 2024
@crespocarlos crespocarlos changed the title [Inventory] Redirect k8s entities to their corresponding detail view [Inventory] Redirect ECS k8s entities to their corresponding dashboards Oct 14, 2024
@crespocarlos crespocarlos changed the title [Inventory] Redirect ECS k8s entities to their corresponding dashboards [Inventory] Redirect ECS k8s entities to their corresponding detail view Oct 16, 2024
@crespocarlos crespocarlos removed the needs-refinement A reason and acceptance criteria need to be defined for this issue label Oct 16, 2024
@crespocarlos crespocarlos removed their assignment Oct 17, 2024
@crespocarlos crespocarlos changed the title [Inventory] Redirect ECS k8s entities to their corresponding detail view [Inventory] Redirect k8s entities to their corresponding detail view Oct 17, 2024
@crespocarlos crespocarlos self-assigned this Oct 21, 2024
crespocarlos added a commit that referenced this issue Oct 22, 2024
part of [#196142](#196142)

## Summary

This PR fixes the Inventory storybook

<img width="600" alt="image"
src="https://github.com/user-attachments/assets/1e16b100-5836-4b48-a7b3-9aa4ab24f475">


### How to test
- Run `yarn storybook inventory`

---------

Co-authored-by: kibanamachine <[email protected]>
cauemarcondes pushed a commit to cauemarcondes/kibana that referenced this issue Oct 31, 2024
part of [elastic#196142](elastic#196142)

## Summary

This PR fixes the Inventory storybook

<img width="600" alt="image"
src="https://github.com/user-attachments/assets/1e16b100-5836-4b48-a7b3-9aa4ab24f475">

### How to test
- Run `yarn storybook inventory`

---------

Co-authored-by: kibanamachine <[email protected]>
(cherry picked from commit 85cf23b)
kibanamachine pushed a commit to kibanamachine/kibana that referenced this issue Oct 31, 2024
part of [elastic#196142](elastic#196142)

## Summary

This PR fixes the Inventory storybook

<img width="600" alt="image"
src="https://github.com/user-attachments/assets/1e16b100-5836-4b48-a7b3-9aa4ab24f475">

### How to test
- Run `yarn storybook inventory`

---------

Co-authored-by: kibanamachine <[email protected]>
(cherry picked from commit 85cf23b)
kibanamachine added a commit that referenced this issue Oct 31, 2024
# Backport

This will backport the following commits from `main` to `8.x`:
- [[Inventory] Fix Inventory storybook
(#197174)](#197174)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Carlos
Crespo","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-10-22T11:17:31Z","message":"[Inventory]
Fix Inventory storybook (#197174)\n\npart of
[#196142](https://github.com/elastic/kibana/issues/196142)\r\n\r\n##
Summary\r\n\r\nThis PR fixes the Inventory storybook\r\n\r\n<img
width=\"600\"
alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/1e16b100-5836-4b48-a7b3-9aa4ab24f475\">\r\n\r\n\r\n###
How to test\r\n- Run `yarn storybook
inventory`\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine
<[email protected]>","sha":"85cf23b8922488139dc46e65b64f400bee660847","branchLabelMapping":{"^v9.0.0$":"main","^v8.17.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","backport:prev-minor","ci:project-deploy-observability","Team:obs-ux-infra_services"],"title":"[Inventory]
Fix Inventory
storybook","number":197174,"url":"https://github.com/elastic/kibana/pull/197174","mergeCommit":{"message":"[Inventory]
Fix Inventory storybook (#197174)\n\npart of
[#196142](https://github.com/elastic/kibana/issues/196142)\r\n\r\n##
Summary\r\n\r\nThis PR fixes the Inventory storybook\r\n\r\n<img
width=\"600\"
alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/1e16b100-5836-4b48-a7b3-9aa4ab24f475\">\r\n\r\n\r\n###
How to test\r\n- Run `yarn storybook
inventory`\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine
<[email protected]>","sha":"85cf23b8922488139dc46e65b64f400bee660847"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/197174","number":197174,"mergeCommit":{"message":"[Inventory]
Fix Inventory storybook (#197174)\n\npart of
[#196142](https://github.com/elastic/kibana/issues/196142)\r\n\r\n##
Summary\r\n\r\nThis PR fixes the Inventory storybook\r\n\r\n<img
width=\"600\"
alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/1e16b100-5836-4b48-a7b3-9aa4ab24f475\">\r\n\r\n\r\n###
How to test\r\n- Run `yarn storybook
inventory`\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine
<[email protected]>","sha":"85cf23b8922488139dc46e65b64f400bee660847"}},{"url":"https://github.com/elastic/kibana/pull/198526","number":198526,"branch":"8.x","state":"OPEN"}]}]
BACKPORT-->

Co-authored-by: Carlos Crespo <[email protected]>
cauemarcondes added a commit that referenced this issue Oct 31, 2024
# Backport

This will backport the following commits from `main` to `8.x`:
 - [Inventory] Fix Inventory storybook (#197174) (85cf23b)

<!--- Backport version: 8.9.8 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Carlos
Crespo","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-10-22T11:17:31Z","message":"[Inventory]
Fix Inventory storybook (#197174)\n\npart of
[#196142](https://github.com/elastic/kibana/issues/196142)\r\n\r\n##
Summary\r\n\r\nThis PR fixes the Inventory storybook\r\n\r\n<img
width=\"600\"
alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/1e16b100-5836-4b48-a7b3-9aa4ab24f475\">\r\n\r\n\r\n###
How to test\r\n- Run `yarn storybook
inventory`\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine
<[email protected]>","sha":"85cf23b8922488139dc46e65b64f400bee660847"},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[]}]
BACKPORT-->

Co-authored-by: Carlos Crespo <[email protected]>
crespocarlos added a commit that referenced this issue Nov 4, 2024
closes [#196142](#196142)

## Summary

Links kubernetes ECS entities to their corresponding dashboards

> [!IMPORTANT]
> ECS `replicaset` doesn't have a dedicated dashboard. `container` will
be handled in a separate ticket
> Semconv won't link to any dashboard/page

<img width="800" alt="image"
src="https://github.com/user-attachments/assets/711dbd28-f0ef-4af0-a658-afe7f1595697">


![redirect](https://github.com/user-attachments/assets/77d5d2e1-7ec4-40cd-b7d8-419e07e6b760)


### How to test
- While #196916 is not merged,
change `ENTITIES_LATEST_ALIAS` constant to `'.entities.v1.latest*'`
- Start a local kibana and es instances 
- Run ` node scripts/synthtrace k8s_entities.ts --live --clean `
- Run `PUT kbn:/internal/entities/managed/enablement` on the devtools
- Install the kubernetes integration package to have the dashboards
installed.
- Navigate to `Inventory` and click through the k8s entities

---------

Co-authored-by: kibanamachine <[email protected]>
Co-authored-by: Elastic Machine <[email protected]>
kibanamachine pushed a commit to kibanamachine/kibana that referenced this issue Nov 4, 2024
)

closes [elastic#196142](elastic#196142)

## Summary

Links kubernetes ECS entities to their corresponding dashboards

> [!IMPORTANT]
> ECS `replicaset` doesn't have a dedicated dashboard. `container` will
be handled in a separate ticket
> Semconv won't link to any dashboard/page

<img width="800" alt="image"
src="https://github.com/user-attachments/assets/711dbd28-f0ef-4af0-a658-afe7f1595697">

![redirect](https://github.com/user-attachments/assets/77d5d2e1-7ec4-40cd-b7d8-419e07e6b760)

### How to test
- While elastic#196916 is not merged,
change `ENTITIES_LATEST_ALIAS` constant to `'.entities.v1.latest*'`
- Start a local kibana and es instances
- Run ` node scripts/synthtrace k8s_entities.ts --live --clean `
- Run `PUT kbn:/internal/entities/managed/enablement` on the devtools
- Install the kubernetes integration package to have the dashboards
installed.
- Navigate to `Inventory` and click through the k8s entities

---------

Co-authored-by: kibanamachine <[email protected]>
Co-authored-by: Elastic Machine <[email protected]>
(cherry picked from commit 8145cb7)
kibanamachine added a commit that referenced this issue Nov 4, 2024
…) (#198815)

# Backport

This will backport the following commits from `main` to `8.x`:
- [[ECO][Inventory] Redirect ECS k8s entities to dashboards
(#197222)](#197222)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Carlos
Crespo","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-11-04T16:01:05Z","message":"[ECO][Inventory]
Redirect ECS k8s entities to dashboards (#197222)\n\ncloses
[#196142](https://github.com/elastic/kibana/issues/196142)\r\n\r\n##
Summary\r\n\r\nLinks kubernetes ECS entities to their corresponding
dashboards\r\n\r\n> [!IMPORTANT]\r\n> ECS `replicaset` doesn't have a
dedicated dashboard. `container` will\r\nbe handled in a separate
ticket\r\n> Semconv won't link to any dashboard/page\r\n\r\n<img
width=\"800\"
alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/711dbd28-f0ef-4af0-a658-afe7f1595697\">\r\n\r\n\r\n![redirect](https://github.com/user-attachments/assets/77d5d2e1-7ec4-40cd-b7d8-419e07e6b760)\r\n\r\n\r\n###
How to test\r\n- While #196916 is
not merged,\r\nchange `ENTITIES_LATEST_ALIAS` constant to
`'.entities.v1.latest*'`\r\n- Start a local kibana and es instances
\r\n- Run ` node scripts/synthtrace k8s_entities.ts --live --clean
`\r\n- Run `PUT kbn:/internal/entities/managed/enablement` on the
devtools\r\n- Install the kubernetes integration package to have the
dashboards\r\ninstalled.\r\n- Navigate to `Inventory` and click through
the k8s entities\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine
<[email protected]>\r\nCo-authored-by:
Elastic Machine
<[email protected]>","sha":"8145cb7c6f483c3a8aa561b492fa098e3ce52027","branchLabelMapping":{"^v9.0.0$":"main","^v8.17.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","backport:prev-minor","ci:project-deploy-observability","Team:obs-ux-infra_services"],"title":"[ECO][Inventory]
Redirect ECS k8s entities to
dashboards","number":197222,"url":"https://github.com/elastic/kibana/pull/197222","mergeCommit":{"message":"[ECO][Inventory]
Redirect ECS k8s entities to dashboards (#197222)\n\ncloses
[#196142](https://github.com/elastic/kibana/issues/196142)\r\n\r\n##
Summary\r\n\r\nLinks kubernetes ECS entities to their corresponding
dashboards\r\n\r\n> [!IMPORTANT]\r\n> ECS `replicaset` doesn't have a
dedicated dashboard. `container` will\r\nbe handled in a separate
ticket\r\n> Semconv won't link to any dashboard/page\r\n\r\n<img
width=\"800\"
alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/711dbd28-f0ef-4af0-a658-afe7f1595697\">\r\n\r\n\r\n![redirect](https://github.com/user-attachments/assets/77d5d2e1-7ec4-40cd-b7d8-419e07e6b760)\r\n\r\n\r\n###
How to test\r\n- While #196916 is
not merged,\r\nchange `ENTITIES_LATEST_ALIAS` constant to
`'.entities.v1.latest*'`\r\n- Start a local kibana and es instances
\r\n- Run ` node scripts/synthtrace k8s_entities.ts --live --clean
`\r\n- Run `PUT kbn:/internal/entities/managed/enablement` on the
devtools\r\n- Install the kubernetes integration package to have the
dashboards\r\ninstalled.\r\n- Navigate to `Inventory` and click through
the k8s entities\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine
<[email protected]>\r\nCo-authored-by:
Elastic Machine
<[email protected]>","sha":"8145cb7c6f483c3a8aa561b492fa098e3ce52027"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/197222","number":197222,"mergeCommit":{"message":"[ECO][Inventory]
Redirect ECS k8s entities to dashboards (#197222)\n\ncloses
[#196142](https://github.com/elastic/kibana/issues/196142)\r\n\r\n##
Summary\r\n\r\nLinks kubernetes ECS entities to their corresponding
dashboards\r\n\r\n> [!IMPORTANT]\r\n> ECS `replicaset` doesn't have a
dedicated dashboard. `container` will\r\nbe handled in a separate
ticket\r\n> Semconv won't link to any dashboard/page\r\n\r\n<img
width=\"800\"
alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/711dbd28-f0ef-4af0-a658-afe7f1595697\">\r\n\r\n\r\n![redirect](https://github.com/user-attachments/assets/77d5d2e1-7ec4-40cd-b7d8-419e07e6b760)\r\n\r\n\r\n###
How to test\r\n- While #196916 is
not merged,\r\nchange `ENTITIES_LATEST_ALIAS` constant to
`'.entities.v1.latest*'`\r\n- Start a local kibana and es instances
\r\n- Run ` node scripts/synthtrace k8s_entities.ts --live --clean
`\r\n- Run `PUT kbn:/internal/entities/managed/enablement` on the
devtools\r\n- Install the kubernetes integration package to have the
dashboards\r\ninstalled.\r\n- Navigate to `Inventory` and click through
the k8s entities\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine
<[email protected]>\r\nCo-authored-by:
Elastic Machine
<[email protected]>","sha":"8145cb7c6f483c3a8aa561b492fa098e3ce52027"}}]}]
BACKPORT-->

Co-authored-by: Carlos Crespo <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New value added to drive a business result Team:obs-ux-infra_services Observability Infrastructure & Services User Experience Team
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants