kubecost / kubectl-cost

CLI for determining the cost of Kubernetes workloads
Apache License 2.0
888 stars 60 forks source link

Add `--opencost` flag to specify standard OpenCost settings #156

Open mattray opened 1 year ago

mattray commented 1 year ago

When using kubectl cost with OpenCost, there are a bunch of boilerplate CLI options you have to add: --service-port 9003 --service-name opencost --kubecost-namespace opencost --allocation-path /allocation/compute

It would be handy to just pass --opencost and get all of those set by default (while still allowing for being more specific if needed).

michaelmdresser commented 11 months ago

I like this idea. This is a great small change if a community member would like to contribute. Matt's comment about "while still allowing for more [specificity]" is particularly pertinent. This would be the area of code to look at to contribute: https://github.com/kubecost/kubectl-cost/blob/703f25ce0fd4350a3a8a4b2bb069eab6173842d7/pkg/query/options.go#L52

cc @kwombach12 apologies for the spam lately, I'm not sure how you'd like to track enhancement requests for this project.

vladComan0 commented 3 months ago

Hi guys! I'd like to pick this up if possible.

mattray commented 3 months ago

Go for it!