kubecost / kubectl-cost

CLI for determining the cost of Kubernetes workloads
Apache License 2.0
872 stars 55 forks source link

[FR/BUG] Show __idle__ costs (again) using OpenCost #163

Closed danielrolfes2307 closed 6 months ago

danielrolfes2307 commented 7 months ago

First-of-all I appreciate all the work that was done in this awesome tool :)

Imho it was possible for kubectl-cost to show "idle"-costs for OpenCost in the past. This does not seem to work anymore. I guess it is related to this: https://github.com/opencost/opencost/issues/1270#issuecomment-1818422930 It would be nice to add ?includeIdle=true parameter to the requests to opencost api (or make it an option).

Regards, Daniel

michaelmdresser commented 6 months ago

Hi @danielrolfes2307, thank you for the suggestion. I have opened https://github.com/kubecost/kubectl-cost/pull/164 which should fix this. Once it is merged and a release has been cut, please give it a try.

drolfes commented 6 months ago

Awesome @michaelmdresser :) Will give this a try (for sure) in the next days.

michaelmdresser commented 6 months ago

The release containing this fix, v0.6.1, is now available. Please let me know if you encounter trouble, I do not test regularly against an Opencost environment so I'm reliant on your support.

danielrolfes2307 commented 6 months ago

@michaelmdresser This works now. Thanks for the fix :) idle_costs