kubecost / cost-analyzer-helm-chart

Kubecost helm chart
http://kubecost.com/install
Apache License 2.0
486 stars 417 forks source link

enhancements to overview-new.html #1499

Closed jessegoodier closed 2 years ago

jessegoodier commented 2 years ago

Note: I'm happy to break this up into multiple requests, just let me know. Sorry if there are duplicates to other requests.

What problem are you trying to solve?

Enhance overview-new.html. Just some ideas- I really do love the new page!

Describe the solution you'd like

Couple ideas for the overview-new.html page:

  1. [x] Remove idle from cluster breakdown.
  2. [ ] Link "Cluster Breakdown" to allocations.html?idle=shareByCluster&agg=cluster
  3. [ ] Link "Cluster Trends" to allocations.html?idle=separate&agg=cluster&chartDisplay=series&window=14d
  4. [ ] Link "Namespace Breakdown" to allocations.html?idle=shareByNode&agg=namespace
  5. [ ] Link "Namespace Trends" to allocations.html?idle=separate&agg=namespace&chartDisplay=series&window=14d
  6. [x] In "Cluster Breakdown" Change link when clicking a cluster to idle=separate
  7. [ ] (if easy) In Namespace Breakdown add number of clusters column
  8. [ ] (if easy) In Cluster Trends chart dropdown: add Idle Costs
  9. [x] On Cluster Trends chart dropdown: change Nodes to: # of Nodes
  10. [x] On Cluster trends chart dropdown: change Pods to: # of Pods
  11. [x] On Namespace trends chart dropdown: change Clusters to: # of Namespaces
  12. [x] On Namespace trends chart dropdown: change Pods to: # of Pods

Clearly you can add "if easy" to all of them. I was just highlighted ones where it seems more difficult than the others.

Describe alternatives you've considered

N/A

How would users interact with this feature?

Via the UI.

teevans commented 2 years ago

Love this - Thank you sir!

Adam-Stack-PM commented 2 years ago

@teevans Any specific items on this list we want to tackle in an up coming release?

@jessegoodier Is this in order of priority or could you separate into two categories?

Example

  1. Feel strongly about
  2. Nice to have/ would be neat
jessegoodier commented 2 years ago

the first item idle is the only must have. the others are all nice to have. I'd let the dev team decide which are easy to do and we can regroup on remainders next cycle.

dwbrown2 commented 2 years ago

Great suggestions!

Remove idle from cluster breakdown.

+1, thought Neal did this actually

Link "Cluster Breakdown" to allocations.html?idle=shareByCluster&agg=cluster

Is this when you click an individual row? If so, would it just show one line-item? One alternative would be to link to Assets by cluster. e.g. http://nightly.kubecost.io:9090/assets.html?agg=type&context=W3sicHJvcGVydHkiOiJTZXJ2aWNlIiwidmFsdWUiOiJLdWJlcm5ldGVzIiwibmFtZSI6Ikt1YmVybmV0ZXMifV0%3D

Link "Cluster Trends" to allocations.html?idle=separate&agg=cluster&chartDisplay=series&window=14d

Would this be making the bars links or something else?

image
jessegoodier commented 2 years ago

looks like it is still there: http://nightly.kubecost.io:9090/overview-new.html

kc-adawson commented 2 years ago

Is overview-new set to be promoted in 1.96? If not, can we give the users an ability to "opt into the new overview"? I think the overview-new even in its current state is much better than the old overview:

2022-07-21_18-58-11
dwbrown2 commented 2 years ago

@nealormsbee has a big PR in the works for performance! I think it's still part of 1.96 plan but he'll know best.

nealormsbee commented 2 years ago

Yes! The plan is to promote overview-new to overview as part of 1.96. Performance is improved to the point that the page loads scale cluster data on the order of 10~20 seconds. I need to confirm that all numbers are solid (it seems like efficiency calculation may have been messed up in the translation) but otherwise we're looking good here.

nealormsbee commented 2 years ago

Revisiting to add some additional clarification.

Thanks y'all! It bears repeating that this kind of feedback and product engagement is really valuable, since you're basically our most accessible power-users :)

nealormsbee commented 2 years ago

I changed the list in OP to have checkboxes so I can check things off as I work.

I guess number 7 is also an interesting one, because that table currently treats cluster/namespace pairs as unique items (hence the 'cluster' column). So if you have a namespace duplicated across 3 clusters, it would show as 3 different items. I think it would be confusing to include "cluster" and "cluster count" columns together. Do you think that table is more useful with each item treated as the aggregation of a namespace across all clusters?

nealormsbee commented 2 years ago

Sorry for the quadruple post! One more thing. A link to the updated Overview in progress is here: https://kc-frontend-dsx10b8n7-kubecost.vercel.app/overview-new?backends=https%3A%2F%2Fmulti.test.kubecost.io

I'm working through these UI enhancements, and also doing my best to test out different cases for numerical accuracy. I'm seeing some small numerical discrepancies that I'm trying to track down. @jessegoodier and/or @dwbrown2 it would be a big help if you have a little free time to click things and point out issues where things don't match, either here or on the PR https://github.com/kubecost/cost-analyzer-frontend/pull/794

I also want to make the loading state of the page a bit nicer. It takes about 20s for this page to load on the scale cluster.

srpomeroy commented 2 years ago

What aggregation is the cluster efficiency metric based on? It used to be namespaces in the old overview. Is it now cluster? We should call out what the aggregation is.

srpomeroy commented 2 years ago

Have we explored using line charts instead of stacked bars? Would be much easier to see the rate of change for a particular resource over time compared to stacked bars.

jessegoodier commented 2 years ago

This looks great! I'll try out and let you know if I find anything.

dwbrown2 commented 2 years ago

Looking awesome @nealormsbee!

jessegoodier commented 2 years ago

I think this should be #of namespaces? image

kc-adawson commented 2 years ago

It would also be great if we had ability to create a "friendly name" for Cloud Accounts, alongside the "account-id". It's tough to tell what is what with the number as the only an identifier.

2022-07-22_16-05-44
kc-adawson commented 2 years ago

Also on 1.95.0, seeing blank links on multiple different Kubecost deployments. You can see it does this on both the Cluster and the Namespace sub-modals on 2 different instances (demo.kubecost.xyz and nightly.kubecost.io)

Kapture 2022-07-22 at 16 09 21

srpomeroy commented 2 years ago

It would also be great if we had ability to create a "friendly name" for Cloud Accounts, alongside the "account-id". It's tough to tell what is what with the number as the only an identifier.

We could pull this data from the bill/api where available as opposed to having to maintain a config-map or some other data source.

nealormsbee commented 2 years ago

@srpomeroy

What aggregation is the cluster efficiency metric based on? It used to be namespaces in the old overview. Is it now cluster? We should call out what the aggregation is.

The query is aggregated by cluster,namespace, but if I'm generating that final number correctly, I don't think it should matter. It should be the average request/usage efficiency of all allocations in ETL, with __idle__ factored in.

Have we explored using line charts instead of stacked bars? Would be much easier to see the rate of change for a particular resource over time compared to stacked bars.

I'm down to visit different visualization options! Probably not this release because there's polish left to do on this page, and I have additional items that need to be done next week.

@dwbrown2

Just curious, how much does dropping pod data impact load time on scale cluster? Would love to see if we can get that down.

That speeds things up dramatically due to the dimensions of scale cluster data. If we drop pod-level info altogether, we're dealing with cluster/node/namespace. There are only 30~40 unique namespaces per day, so we go from working with ~120k items per day (pods) to ~35 items per day.

What do you think about deep linking this card to spend aggregated by Service with cloud filter? Currently just shows one-line of "Cloud"

That seems reasonable to me :joy:

High row counts feels like it makes these cards have excessive vertical size. Thoughts on dropping count per page drop down or doing scroll on this view like in the new design system? I'd call this P2 at best.

I can make that 5 rows per page in less time than it took to type this sentence.

@jessegoodier

I think this should be #of namespaces?

It's intended to be # of clusters! That mode is supposed to show the number of clusters in which each namespace exists, on each day. Sort of the opposite of the table situation I mentioned above, where each row is a cluster/namespace pair, if that makes sense.

I get how it's confusing...in the table we treat a namespace as "belonging to a cluster" (one-many) and then in the graph we treat it as a many-many type of relationship. I'm not really sure what the right resolution here is.

@kc-adawson

It would also be great if we had ability to create a "friendly name" for Cloud Accounts, alongside the "account-id". It's tough to tell what is what with the number as the only an identifier

I like that idea. Was going to suggest a Helm config until I saw Sean's comment. Won't make 1.96 and will likely entail some UI/API cooperation. Would you mind opening a separate enhancement issue for this?

Also on 1.95.0, seeing blank links on multiple different Kubecost deployments. You can see it does this on both the Cluster and the Namespace sub-modals on 2 different instances (demo.kubecost.xyz and nightly.kubecost.io)

Good catch. Those links are fixed in my open PR for this view! So it won't be a problem when we promote in 1.96.

@all

Thank you SO MUCH for taking the time to go through this and leave thoughtful notes 🙂

jessegoodier commented 2 years ago

Should we close this?

It is mostly done and we can create a new ER for anything that comes up again?

nealormsbee commented 2 years ago

That sounds good to me. With the different design, several of these may not even make sense now. Closing the issue. Thanks Jesse!