Skip to content

Frontend: Node: Add pod usage tile for node view#5039

Open
Vikaspal8923 wants to merge 1 commit intokubernetes-sigs:mainfrom
Vikaspal8923:node-pods-usage
Open

Frontend: Node: Add pod usage tile for node view#5039
Vikaspal8923 wants to merge 1 commit intokubernetes-sigs:mainfrom
Vikaspal8923:node-pods-usage

Conversation

@Vikaspal8923
Copy link
Copy Markdown
Contributor

Summary

This PR adds pod capacity usage to the node details view so users can see how many pods are scheduled on a node compared with that node's allocatable pod limit.

Related Issue

Fixes #5034

Changes

  • Added a pod usage circular tile for the node details header
  • Fetched node-scoped pods using a spec.nodeName=<node> field selector in the node details view

Steps to Test

  1. Navigate to the Nodes page and open any single node details view
  2. Confirm a Pod Usage tile appears
  3. Verify the Pod Usage tile shows the number of pods on that node out of the node pod limit

Screenshots (if applicable)

Screenshot from 2026-04-02 23-21-10

Notes for the Reviewer

  • Pod usage is calculated from pods fetched with fieldSelector=spec.nodeName=<node-name>
  • The total uses status.allocatable.pods and falls back to status.capacity.pods

@k8s-ci-robot k8s-ci-robot requested review from illume and skoeva April 2, 2026 17:59
@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Apr 2, 2026
@k8s-ci-robot
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: Vikaspal8923
Once this PR has been reviewed and has the lgtm label, please assign illume for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Apr 2, 2026
Copy link
Copy Markdown
Contributor

@sniok sniok left a comment

Choose a reason for hiding this comment

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

Ci is failing on the i18n check, please make sure you've updated the translations by running npm run i18n in the frontend folder

@Vikaspal8923
Copy link
Copy Markdown
Contributor Author

Done , i have updated translations . Let me know if any other changes needed

@sniok
Copy link
Copy Markdown
Contributor

sniok commented Apr 3, 2026

could you please squash it into a single commit, translations should be in the same commit that changes them

@Vikaspal8923 Vikaspal8923 force-pushed the node-pods-usage branch 3 times, most recently from 635bf7a to 383ea09 Compare April 4, 2026 10:06
@Vikaspal8923
Copy link
Copy Markdown
Contributor Author

Done 👍

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds a “Pod Usage” capacity tile to the Node details header, showing scheduled pod count vs the node’s allocatable/capacity pod limit.

Changes:

  • Fetch node-scoped pods in the node details view using fieldSelector=spec.nodeName=<node>.
  • Add a new PodCapacityCircularChart tile and wire it into the node header charts section.
  • Introduce new i18n keys for “Pod Usage” and the {{ used }} / {{ total }} Pods legend across locales.

Reviewed changes

Copilot reviewed 15 out of 15 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
frontend/src/components/node/Details.tsx Fetches pods for the node and renders the new Pod Usage tile in the header charts grid.
frontend/src/components/cluster/Charts/ResourceCharts.tsx Implements PodCapacityCircularChart using TileChart.
frontend/src/components/cluster/Charts/index.ts Re-exports the new pod capacity chart.
frontend/src/i18n/locales/en/translation.json Adds English strings for the new Pod Usage tile.
frontend/src/i18n/locales/de/translation.json Adds new keys (currently empty values) for Pod Usage.
frontend/src/i18n/locales/es/translation.json Adds new keys (currently empty values) for Pod Usage.
frontend/src/i18n/locales/fr/translation.json Adds new keys (currently empty values) for Pod Usage.
frontend/src/i18n/locales/hi/translation.json Adds new keys (currently empty values) for Pod Usage.
frontend/src/i18n/locales/it/translation.json Adds new keys (currently empty values) for Pod Usage.
frontend/src/i18n/locales/ja/translation.json Adds new keys (currently empty values) for Pod Usage.
frontend/src/i18n/locales/ko/translation.json Adds new keys (currently empty values) for Pod Usage.
frontend/src/i18n/locales/pt/translation.json Adds new keys (currently empty values) for Pod Usage.
frontend/src/i18n/locales/ta/translation.json Adds new keys (currently empty values) for Pod Usage.
frontend/src/i18n/locales/zh/translation.json Adds new keys (currently empty values) for Pod Usage.
frontend/src/i18n/locales/zh-tw/translation.json Adds new keys (currently empty values) for Pod Usage.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 15 out of 15 changed files in this pull request and generated 1 comment.

Copy link
Copy Markdown
Contributor

@illume illume left a comment

Choose a reason for hiding this comment

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

Can you please have a look at that one break point review comment?

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 15 out of 15 changed files in this pull request and generated 2 comments.

@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Apr 6, 2026
@Vikaspal8923
Copy link
Copy Markdown
Contributor Author

can you take a look now ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Show node pod capacity

5 participants