Skip to content

Conversation

JORDAN-RYAN1
Copy link

What does this PR change?

  • Updates the Allocation Report UI to include the namespace when displaying the resource name.
  • Now shows names in the format: namespace:controller:podname (or namespace:resource).

Does this PR relate to any other PRs?

  • No, this is a standalone fix.

How will this PR impact users?

  • Users can now differentiate same-named deployments, pods, or services across different namespaces in the Allocations view.
  • Improves cost reporting clarity for multi-tenant Kubernetes clusters.

Does this PR address any GitHub or Zendesk issues?

  • Closes #1964 — "Include namespace in UI/metrics"

How was this PR tested?

  • Ran frontend locally using npm start.
  • Verified that allocation rows now show namespace:resource format correctly.
  • Verified fallback behavior — if namespace is missing, display only the resource name.

Does this PR require changes to documentation?

  • No changes needed. This is a UI display enhancement only.

Have you labeled this PR and its corresponding Issue as "next release" if it should be part of the next OpenCost release? If not, why not?

  • No, this is a minor UI improvement and can be merged under normal releases without special labeling.

Signed-off-by: Jordan Ryan  <[email protected]>
Copy link

netlify bot commented Apr 28, 2025

Deploy Preview for opencost-ui ready!

Name Link
🔨 Latest commit 1ec2d6d
🔍 Latest deploy log https://app.netlify.com/projects/opencost-ui/deploys/688296750af6ed00085729f0
😎 Deploy Preview https://deploy-preview-81--opencost-ui.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@joao-pimentel-randoli
Copy link

Hi there, thank you for your contribution!
Maybe there's something wrong in the deployment preview, but on that link I only see the namespaces being added to the Namespace breakdown, which is not useful bcs the namespace breakdown already displays the namespace name:
image

In the other breakdowns, the namespace is not being displayed. Example (pod breakdown):
image

Also, as noted by Matt on the original issue, the namespace is already displayed if the user specifies multi-aggregation with namespace. Example: breakdown by controller and namespace https://demo.infra.opencost.io/?agg=namespace,controller
image

Please note that if the namespace is not included in the aggregation, the response may have entries running on multiple namespaces (ex: the same deployment name may be running in multiple namespaces)

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

Successfully merging this pull request may close these issues.

Include namespace in ui/metrics
3 participants