76 Commits

Author SHA1 Message Date
Rickard Dybeck e68cb8ac0f feat(kubernetes-react): add optional getClusters() cache to KubernetesBackendClient (#34136)
fix(kubernetes-react): coalesce concurrent getClusters() fetches and validate TTL input

Signed-off-by: Rickard Dybeck <dybeck@spotify.com>
2026-05-06 09:16:24 -04:00
Patrik Oldsberg 717bbaf075 Fix alpha entry point translation ref re-exports to use @alpha instead of @public
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-17 17:50:25 +01:00
Patrik Oldsberg 0be2541b5c Promote translation refs from alpha to stable entry points
Add each plugin and package translation ref to the corresponding stable
entry point, changing the JSDoc tag from @alpha to @public. The alpha
entry points now re-export with a @deprecated annotation so existing
consumers continue to work.

Affected packages: core-components, api-docs, catalog, catalog-graph,
catalog-import, catalog-react, home, home-react, kubernetes,
kubernetes-cluster, kubernetes-react, notifications, org, scaffolder,
scaffolder-react, search, search-react, user-settings.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-17 17:50:25 +01:00
KoB ce3639c588 feat(kubernetes-plugin): add pv and pvc rendering (#31355)
* feat: add persistent volumes rendering

Signed-off-by: 김병준 <kingbj0429@gmail.com>
Signed-off-by: KoB <63000843+kingbj940429@users.noreply.github.com>

* feat: add pv status

Signed-off-by: 김병준 <kingbj0429@gmail.com>
Signed-off-by: KoB <63000843+kingbj940429@users.noreply.github.com>

* feat: add volume status and volume type

Signed-off-by: 김병준 <kingbj0429@gmail.com>
Signed-off-by: KoB <63000843+kingbj940429@users.noreply.github.com>

* feat: add test for pv

Signed-off-by: 김병준 <kingbj0429@gmail.com>
Signed-off-by: KoB <63000843+kingbj940429@users.noreply.github.com>

* feat: add persistent volume claims

Signed-off-by: 김병준 <kingbj0429@gmail.com>
Signed-off-by: KoB <63000843+kingbj940429@users.noreply.github.com>

* feat: add persistent volume status pending

Signed-off-by: 김병준 <kingbj0429@gmail.com>
Signed-off-by: KoB <63000843+kingbj940429@users.noreply.github.com>

* feat: add persistent volume metadata

Signed-off-by: 김병준 <kingbj0429@gmail.com>
Signed-off-by: KoB <63000843+kingbj940429@users.noreply.github.com>

* feat: add persistent volume claims metadata

Signed-off-by: 김병준 <kingbj0429@gmail.com>
Signed-off-by: KoB <63000843+kingbj940429@users.noreply.github.com>

* feat: add persistent volume claims test code

Signed-off-by: 김병준 <kingbj0429@gmail.com>
Signed-off-by: KoB <63000843+kingbj940429@users.noreply.github.com>

* chore: changeset

Signed-off-by: 김병준 <kingbj0429@gmail.com>
Signed-off-by: KoB <63000843+kingbj940429@users.noreply.github.com>

* chore: remove gcp and gke.io

Signed-off-by: 김병준 <kingbj0429@gmail.com>
Signed-off-by: KoB <63000843+kingbj940429@users.noreply.github.com>

* chore: yarn build:api-reports

Signed-off-by: 김병준 <kingbj0429@gmail.com>
Signed-off-by: KoB <63000843+kingbj940429@users.noreply.github.com>

* feat: update pv to table drawer like pod

Signed-off-by: 김병준 <kingbj0429@gmail.com>
Signed-off-by: KoB <63000843+kingbj940429@users.noreply.github.com>

* feat: update pvc to table drawer like pod

Signed-off-by: 김병준 <kingbj0429@gmail.com>
Signed-off-by: KoB <63000843+kingbj940429@users.noreply.github.com>

* chore: remove user event at test code

Signed-off-by: 김병준 <kingbj0429@gmail.com>
Signed-off-by: KoB <63000843+kingbj940429@users.noreply.github.com>

* chore: exclude pv,pvc from default objects

Signed-off-by: 김병준 <kingbj0429@gmail.com>
Signed-off-by: KoB <63000843+kingbj940429@users.noreply.github.com>

* chore: remove duplication import for pv

Signed-off-by: 김병준 <kingbj0429@gmail.com>
Signed-off-by: KoB <63000843+kingbj940429@users.noreply.github.com>

* chore: yarn build:api-reports

Signed-off-by: 김병준 <kingbj0429@gmail.com>
Signed-off-by: KoB <63000843+kingbj940429@users.noreply.github.com>

* chore: retrigger required checks

Signed-off-by: KoB <63000843+kingbj940429@users.noreply.github.com>

* chore: retrigger required checks

Signed-off-by: KoB <63000843+kingbj940429@users.noreply.github.com>

* chore: retrigger required checks

Signed-off-by: KoB <63000843+kingbj940429@users.noreply.github.com>

* chore: retrigger required checks

Signed-off-by: KoB <63000843+kingbj940429@users.noreply.github.com>

---------

Signed-off-by: 김병준 <kingbj0429@gmail.com>
Signed-off-by: KoB <63000843+kingbj940429@users.noreply.github.com>
2026-01-28 14:31:01 -05:00
Fredrik Adelöw 7455dae884 require the use of node prefix on native imports
Signed-off-by: Fredrik Adelöw <freben@gmail.com>
2026-01-26 13:22:53 +01:00
Johan Persson e70ff47db3 chore: migrate three packages to MSW v2
Migrates test files in config-loader, events-node and kubernetes-react
packages from MSW 1.x to MSW 2.x API to fix compatibility issues with
Jest 30 and JSDOM v26.

Changes:
- Updated msw dependency from ^1.0.0 to ^2.0.0
- Changed imports from `rest` to `http` and `HttpResponse`
- Converted handler syntax from `res(ctx.*)` to `HttpResponse.*`
- Changed `toStrictEqual` to `toEqual` for response assertions

Affected packages:
- @backstage/config-loader
- @backstage/plugin-events-node
- @backstage/plugin-kubernetes-react

Signed-off-by: Johan Persson <johanopersson@gmail.com>
2025-12-11 18:07:00 +01:00
Johan Persson cd0b8a11a3 chore: make jest a peer dependency with v29/v30 support
Move jest from dependencies to peer dependencies, allowing users to
choose between Jest 29 and Jest 30.

The CLI now detects the Jest version at runtime and uses the
appropriate environment:
- Jest 29: Uses standard jest-environment-jsdom
- Jest 30: Uses a custom environment based on @jest/environment-jsdom-abstract
  with fixes for Web API globals (fetch, streams, Error, etc.)

The cross-fetch polyfill is only injected for Jest 29, as with Jest 30+
our patched Jest environment is used. The network request blocker is made
MSW-compatible by checking if fetch was wrapped before blocking.

Jest 30 (with jsdom v27) fixes `Could not parse CSS stylesheet`
warnings/errors when testing components from @backstage/ui or other
packages using CSS `@layer` declarations.

New peer dependencies (install based on your Jest version):
- jest (required, ^29 or ^30)
- Jest 29 requires: jest-environment-jsdom
- Jest 30 requires: @jest/environment-jsdom-abstract, jsdom

Production code changes for jsdom 27 testability:
- AppIdentityProxy: extract navigateToUrl method for spying
- LiveReloadAddon: export utils.reloadPage for spying
- collect.ts: export internal.resolvePackagePath for mocking

MockFetchApi: evaluate global.fetch at call time instead of construction
time, allowing MSW to patch fetch after MockFetchApi is constructed.

Test adaptations for jsdom 27:
- Use RGB values instead of named colors in CSS assertions
- Update error format expectations (hyphenated type names, SyntaxError
  instead of FetchError for JSON parse errors)
- Simplify URL error assertions for cross-version compatibility
- Fix accessible name whitespace handling for external links
- Use history.replaceState for location mocking (non-configurable)
- Use fireEvent.blur for contentEditable elements
- Move async assertions inside waitFor for race conditions
- Remove Blob.prototype.text polyfill (now native)
- Remove test case using credentials in plugin:// URLs

Test adaptations for Jest 30:
- Replace `expect.objectContaining([...])` with direct array equality
- Replace `expect.objectContaining({ length: N })` with
  `expect.any(Array)` + separate `toHaveLength()` assertions
- Use child process for native Node.js module resolution in
  collect.test.ts to work around Jest 30's resolver behavior
- Update snapshot headers for new Jest format

Also removes the jest-haste-map patch which is no longer needed.

Signed-off-by: Johan Persson <johanopersson@gmail.com>
2025-12-11 18:06:55 +01:00
KoB 8fa8d87e3b feat(kubernetes-plugin): add secrets rendering (#31415)
* feat: mask secret datas

Signed-off-by: 김병준 <kingbj0429@gmail.com>

* feat: add secrets accordion

Signed-off-by: 김병준 <kingbj0429@gmail.com>

* feat: add test code for secrets accordion

Signed-off-by: 김병준 <kingbj0429@gmail.com>

* feat: add test code for secrets fetch

Signed-off-by: 김병준 <kingbj0429@gmail.com>

* chore: changeset

Signed-off-by: 김병준 <kingbj0429@gmail.com>

* chore: yarn build:api-reports

Signed-off-by: 김병준 <kingbj0429@gmail.com>

* chore: remove secrets from default object and rollback test code

Signed-off-by: 김병준 <kingbj0429@gmail.com>

* chore: extract to helper function

Signed-off-by: 김병준 <kingbj0429@gmail.com>

* chore: add test code for helper function

Signed-off-by: 김병준 <kingbj0429@gmail.com>

---------

Signed-off-by: 김병준 <kingbj0429@gmail.com>
2025-12-01 19:35:34 -05:00
KoB f966a8557f feat(kubernetes-plugin): enable a pod terminal at GCP GKE (#31915)
* chore: remove google for enabling pod terminal at gke

Signed-off-by: 김병준 <kingbj0429@gmail.com>

* chore: add chageset

Signed-off-by: 김병준 <kingbj0429@gmail.com>

* chore: update test code for enabling a pod terminal at gke

Signed-off-by: 김병준 <kingbj0429@gmail.com>

---------

Signed-off-by: 김병준 <kingbj0429@gmail.com>
2025-12-01 19:34:10 -05:00
its-mitesh-kumar 0afbd91822 updating api report
Signed-off-by: its-mitesh-kumar <itsmiteshkumar98@gmail.com>
2025-11-19 14:02:00 +05:30
its-mitesh-kumar bb42830a77 address remaining comments
Signed-off-by: its-mitesh-kumar <itsmiteshkumar98@gmail.com>
2025-11-18 20:17:39 +05:30
its-mitesh-kumar ff28f897c4 addressing review comments
Signed-off-by: its-mitesh-kumar <itsmiteshkumar98@gmail.com>
2025-11-18 19:37:25 +05:30
its-mitesh-kumar c623e3d80d updating the tests
Signed-off-by: its-mitesh-kumar <itsmiteshkumar98@gmail.com>
2025-11-06 18:25:21 +05:30
its-mitesh-kumar 9d5d9cb73a feat(kubernetes): adding localization support
Signed-off-by: its-mitesh-kumar <itsmiteshkumar98@gmail.com>
2025-11-06 15:34:46 +05:30
Paul Schultz 05f60e1e0a refactor: convert constructor parameter properties for erasableSyntaxOnly compatibility
Signed-off-by: Paul Schultz <pschultz@pobox.com>
2025-10-14 08:29:21 -05:00
Fredrik Adelöw e5ece8f6b1 Merge pull request #31208 from kingbj940429/kubernetes-configmaps-rendering
feat(kubernetes-plugin): add configmaps rendering
2025-09-30 14:32:21 +02:00
김병준 cee51f7c4e chore: deelete public comment
Signed-off-by: 김병준 <kingbj0429@gmail.com>
2025-09-30 10:42:44 +09:00
김병준 5787cda0b9 feat: add test for configmap
Signed-off-by: 김병준 <kingbj0429@gmail.com>
2025-09-20 14:07:50 +09:00
김병준 f569535114 feat: add kubernetes configmap component
Signed-off-by: 김병준 <kingbj0429@gmail.com>
2025-09-20 13:55:54 +09:00
Adam Letizia f7a414425d fix(kubernetes): fixes calculation of pod cpu utilization
Signed-off-by: Adam Letizia <LetiziaAdam@JohnDeere.com>
2025-09-09 08:33:04 -05:00
Patrik Oldsberg 7edb8c182c Merge pull request #29623 from GabDug/xterm-deprecation
chore(deps): Update deprecated xterm to new package under @xterm
2025-06-14 11:39:40 +02:00
Fredrik Adelöw 28aa309325 Merge pull request #29665 from GabDug/typos
chore(typos): fix various code typos
2025-04-28 16:50:18 +02:00
Vincenzo Scamporlino 5c8fbb8526 Merge pull request #29570 from yolossn/headlamp-formatter
feat(kubernetes): add headlamp dashboard formatter
2025-04-23 22:32:41 +02:00
Gabriel Dugny 72d019d663 chore(typos): Fix low-impact typos
Signed-off-by: Gabriel Dugny <gabriel.dugny@believe.com>
2025-04-23 17:56:22 +02:00
Fredrik Adelöw 835764ac43 fixup
Signed-off-by: Fredrik Adelöw <freben@gmail.com>
2025-04-22 17:31:19 +02:00
Gabriel Dugny 3ea5d1b6ff chore(deps): Update deprecated xterm to new package under @xterm
Signed-off-by: Gabriel Dugny <gabriel.dugny@believe.com>
2025-04-16 00:01:23 +02:00
yolossn 195652d06d feat(kubernetes): add headlamp dashboard formatter
this patch adds formatter for Headlamp to the
kubernetes-react plugin.

Signed-off-by: yolossn <sannagaraj@microsoft.com>
2025-04-14 00:09:31 +05:30
Paul Schultz 2e26579e06 chore: update react imports
Signed-off-by: Paul Schultz <pschultz@pobox.com>
2025-04-08 07:35:24 -05:00
Chris Langhout b6c5ea2aba chore: change yaml rendering to be an option and enable for kubernetes plugin FE components
Signed-off-by: Chris Langhout <clanghout@bol.com>
2025-01-24 08:53:03 +01:00
Chris Langhout cd1256e5a4 chore: change more tests to match yaml display
Signed-off-by: Chris Langhout <clanghout@bol.com>
2025-01-24 08:53:03 +01:00
Chris Langhout 28bb3749d8 chore: adapt tests; keys are displayed as is instead of formatted and capitalized
Signed-off-by: Chris Langhout <clanghout@bol.com>
2025-01-24 08:53:03 +01:00
Wellington Garcia f35a754f48 fix: convert string to int to handle with decimal bigInt (#28384)
* fix: convert string to int to handle with decimal bigInt

Signed-off-by: Wellington Garcia <garciawell@gmail.com>

* fix: change + to Number more readable

Signed-off-by: Wellington Garcia <garciawell@gmail.com>

---------

Signed-off-by: Wellington Garcia <garciawell@gmail.com>
2025-01-17 08:16:42 -05:00
Seba 0b729da922 add the pod delete feature to the kubernetes react plugin (#24534)
* add the pod delete feature to the kubernetes react plugin

Signed-off-by: sebalaini <sebastianolaini@gmail.com>

* move podDelete into PodDrawer

Signed-off-by: sebalaini <sebastianolaini@gmail.com>

* remove dialog and use only a button

Signed-off-by: sebalaini <sebastianolaini@gmail.com>

* move config inside frontend object

Signed-off-by: sebalaini <sebastianolaini@gmail.com>

* update the k8 configration.md documentation

Signed-off-by: sebalaini <sebastianolaini@gmail.com>

* add error ui if error

Signed-off-by: sebalaini <sebastianolaini@gmail.com>

* refactor restart text logic

Signed-off-by: sebalaini <sebastianolaini@gmail.com>

* fix test var name

Signed-off-by: sebalaini <sebastianolaini@gmail.com>

* fix doc key

Signed-off-by: sebalaini <sebastianolaini@gmail.com>

* revert last commit

Signed-off-by: sebalaini <sebastianolaini@gmail.com>

* add i18n

Signed-off-by: sebalaini <sebastianolaini@gmail.com>

* Update plugins/kubernetes-react/src/translation.ts

Co-authored-by: Patrik Oldsberg <poldsberg@gmail.com>
Signed-off-by: Seba <17096352+sebalaini@users.noreply.github.com>

* remove buttonText config

Signed-off-by: sebalaini <sebastianolaini@gmail.com>

* add alpha and doc

Signed-off-by: sebalaini <sebastianolaini@gmail.com>

* add alpha api report

Signed-off-by: sebalaini <sebastianolaini@gmail.com>

---------

Signed-off-by: sebalaini <sebastianolaini@gmail.com>
Signed-off-by: Seba <17096352+sebalaini@users.noreply.github.com>
Co-authored-by: Patrik Oldsberg <poldsberg@gmail.com>
2024-11-05 15:04:48 -05:00
Corey Daley 71b87043ef Bump @kubernetes/client-node to ^1.0.0-rc7
Signed-off-by: Corey Daley <cdaley@redhat.com>
2024-10-28 08:44:22 -04:00
Fredrik Adelöw 3afafea87b implement discovery too
Signed-off-by: Fredrik Adelöw <freben@gmail.com>
2024-10-11 09:49:37 +02:00
Deepankumar 954a5939db Liveness probe added in ContainerCard component (#25958)
* Liveness probe added in ContainerCard component

Signed-off-by: Deepankumar Loganathan <deepan0433@gmail.com>

* liveness probe shows only if available

Signed-off-by: Deepankumar Loganathan <deepan0433@gmail.com>

* changed return object from variable

Signed-off-by: Deepankumar Loganathan <deepan0433@gmail.com>

---------

Signed-off-by: Deepankumar Loganathan <deepan0433@gmail.com>
2024-08-15 09:10:48 +01:00
Camila Belo b82aff92aa refactor(test-utils): deprecate the isDockerDisabledForTests function
Signed-off-by: Camila Belo <camilaibs@gmail.com>
2024-07-10 17:06:00 +02:00
Camila Belo 95a3a0b91c refactor(test-utils): rename setupRequestMockHandlers to setupMswHandler
Signed-off-by: Camila Belo <camilaibs@gmail.com>
2024-07-10 15:45:49 +02:00
Seba 2414d86668 Kubernetes react -> Warning: validateDOMNesting(...): <ul> cannot appear as a descendant of <p> (#25559)
* fix html markup in FixDialog

Signed-off-by: sebalaini <sebastianolaini@gmail.com>

* Update .changeset/short-impalas-suffer.md

Co-authored-by: Camila Belo <camilaibs@gmail.com>
Signed-off-by: Seba <17096352+sebalaini@users.noreply.github.com>

---------

Signed-off-by: sebalaini <sebastianolaini@gmail.com>
Signed-off-by: Seba <17096352+sebalaini@users.noreply.github.com>
Co-authored-by: Camila Belo <camilaibs@gmail.com>
2024-07-10 08:28:50 -04:00
Ilias Van Peer e3cb6abeec Add namespace label to argo rollouts in kubernetes (#25467)
* Create fixture for rollouts

Since rollouts have customized support, having a fixture for them can
help in maintaining their rendering.

Signed-off-by: ilias <mail@ilias.xyz>

* Show namespace on Argo Rollout drawers

Signed-off-by: ilias <mail@ilias.xyz>

* Add changeset

Signed-off-by: ilias <mail@ilias.xyz>

* Check namespace shows up on rollouts

Signed-off-by: ilias <mail@ilias.xyz>

---------

Signed-off-by: ilias <mail@ilias.xyz>
2024-07-02 10:47:10 -04:00
Patrik Oldsberg b3906b2347 Merge pull request #24878 from alexef/more-fetch
fix: use fetchApi instead of explicit identityApi token in remaining plugins
2024-05-28 15:02:35 +02:00
Alex Eftimie 206ce36aa2 Use fetch
Signed-off-by: Alex Eftimie <alex.eftimie@getyourguide.com>
2024-05-23 10:39:51 +02:00
Matthew Clarke 0177f75892 fix: move kubernetes autoscaling to v2
Signed-off-by: Matthew Clarke <mclarke@spotify.com>
2024-05-17 16:17:37 -04:00
Seba 3102a99f48 add the namespace label to CronJobDrawer & IngressDrawer (#24485)
Signed-off-by: sebalaini <sebastianolaini@gmail.com>
2024-04-26 14:28:17 -04:00
Timothy Deakin 58800ba44c feat: add eslint rule for top level imports
Signed-off-by: Timothy Deakin <cftad@protonmail.com>
2024-04-13 18:01:36 +01:00
Deepankumar e6d474f1bb Fixed ResourceUtilization component for POD Memory Limits (#23982)
Signed-off-by: Deepankumar Loganathan <deepan0433@gmail.com>
2024-04-04 11:36:41 -04:00
Tomasz Szuba e8f026a300 Use esm exports from react-use library
Signed-off-by: Tomasz Szuba <tszuba@box.com>
2024-03-19 19:53:04 +00:00
rui ma ff7e12632d feat: support i18n for core component
Signed-off-by: rui ma <ruima@alauda.io>
2024-02-27 21:03:28 +08:00
Andres Mauricio Gomez P 4642cb7ac2 Added support to fetch data for Daemon Sets and display an accordion in the same way as with Deployments
Signed-off-by: Andres Mauricio Gomez P <andmagom@outlook.com>
2024-02-16 13:28:32 -05:00
Jamie Klassen 5bf0c17bae pod dialogs display cluster title
Signed-off-by: Jamie Klassen <jamie.klassen@broadcom.com>
2024-02-08 09:51:39 -05:00