kubecost / cost-analyzer-helm-chart

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

Add "proportion of cluster" information to Allocation report #1930

Closed keithhand closed 4 months ago

keithhand commented 1 year ago

What problem are you trying to solve? Some chargeback models are based on the proportion of total cluster cost that any single aggregation use. This proportion is displayed when you view the "Proportional Costs" chart; however, if there are more than ten items, the rest of the items get categorized under "other," and you can't see the proportional cost of each item.

Describe the solution you'd like I want a visual display of any line item's proportional costs on an allocation report.

Describe alternatives you've considered Manually calculate the proportion based on the cluster's total costs and each line's total costs.

How would users interact with this feature? View the new column on the allocation report, or allow users to bypass the 10-item limit on the graph displayed (I feel like this way could get noisy)

┆Issue is synchronized with this Jira Task by Unito

wamak9 commented 1 year ago

+1

kwombach12 commented 1 year ago

I think the 'semi-circle' visualization of proportional costs really limits us from showing more items (I also find it hard to read). Perhaps a different visualization of proportional costs could be effective here. Im thinking something like this:

Screenshot 2023-01-30 at 11 55 35 AM

@Annalillie Do you mind doing a quick mock-up of what this could look like with a bunch of items?

Annalillie commented 1 year ago

Most definitely! I'll love to work on hashing this ux out. I'll update with mocks when they're ready.

Annalillie commented 1 year ago

There's a prototype here. I'd love some feedback or thoughts :) image image

wamak9 commented 1 year ago

@Annalillie -- This looks good. But can we fit everything here? @kwombach12 -- Can we add an export functionality here with the option to export proportional cost onto a excel sheet ? Or maybe can we display proportional cost in the below column details.

Annalillie commented 1 year ago

Thank you @akramwaseem. With this chart, we can expand vertically. @keithhand proposed having the option to bypass the 10 item limit. This could trigger the charts expansion to show more items. There's also the option to interact with/click into the "other" tile and view the items placed there. I agree that too many items on the screen will begin to feel cluttered. This wouldn't be as significant if it's presented as an action that can be selected/deselected according to the users needs.

keithhand commented 1 year ago

Another option that might be work looking at is adding the column to the report output. This sounds good to me because it doesn't introduce any more clutter with the graphic and gives the user a way to use features like export to CSV. image

kwombach12 commented 1 year ago

@keithhand I will add that to our feature backlog. For me, its low priority given that users should be able to calculate the proportional cost quite easily today by dividing the Total Cost for an item by the overall Total Cost.

teevans commented 1 year ago

A thought here too - this would be pretty quick to add to the csv output I believe...so if we needed it in quick, that would be a way to solve it...but loading a csv into excel and doing your own formula may yield more tailored results anyhow.

wamak9 commented 1 year ago

@keithhand I will add that to our feature backlog. For me, its low priority given that users should be able to calculate the proportional cost quite easily today by dividing the Total Cost for an item by the overall Total Cost.

I think it's more complicated than that. image having 15 shared namespaces and multiple clusters with just shared namespaces. and running 20 K8s cluster and then calculating the proportional cost across all the 20 K8s clusters.

If that is something achievable and doesn't need lot of manual intervention on user side, it is worth looking into it. maybe generate a CSV and then user can do whatever they want with the CSV.

Current CSV format is not at all in readable format for most of the users. it's hard to figure out the proportional cost for everything with all the over complicated details listed on the CSV.

wamak9 commented 1 year ago

@kwombach12 -- any update on this? Can we at least add something to the CSV file when exporting?

AjayTripathy commented 1 year ago

Hey @wamak9 , I started this ticket https://github.com/opencost/opencost/issues/1731 to look at adding proportional cost to the API spec. would that sort of API change satisfy your needs here? I'd imagine we'd bring to the frontend shortly after.

wamak9 commented 1 year ago

We dont use APIs at the moment and have no plans yet. I would appreciate if this can come to frontend.

wamak9 commented 1 year ago

bump

chipzoller commented 4 months ago

Closing, stale. For any future enhancements or bugs which do not pertain specifically to the Helm chart, please log them in the features-bugs repo.