Closed michaelmdresser closed 1 year ago
Super cool! cc @kwombach12 for UX feedback but lgtm!
@michaelmdresser very cool. The data is readable and well-presented.
I suggest we explicitly state that it's the diff if we're showing this by default... i.e. we could have one sentence before the table showing something like:
"Expected monthly cost change is as follows:"
vs
"Expected monthly total cost is as follows:"
Thoughts?
The table shows both total cost and cost change on two resources: cpu and memory. If you think the delta symbol isn't universal enough to convey "difference" we can think up something to address it. I mainly want to avoid cluttering up the terminal output, as IMO its better for tools like this to be straight to the point with useful --help
text if users are confused. Happy to update that, too if it isn't clear.
I see your point. I think some users may either miss or not understand the user of delta. One reason for the latter might be that it's not applied to "Total/Mo" Column. Should that be changed to Diff/Mo?
The current predict API only diffs CPU and memory but kubectl cost predict
also shows GPU cost. This means we can't put a diff on total cost, only on CPU and memory individually right now. So, the total/mo column right now is not a diff; even now I can recognize how that might be confusing.
I'm hoping it will be straightforward to address this UX shortcoming once I finish the better predict API, incorporating what we've learned.
What does this PR change?
See release note. Diff behavior matches the current diff used by our new Admission Controller.
How does this PR impact users? (This is the kind of thing that goes in release notes!)
kubectl cost predict
. The default behavior will attempt to match workload specs with existing workloads tracked by Kubecost and will calculate a cost diff based on resource request. Disable with--no-diff
.kubectl cost predict
workload name output. If a namespace is not set on a given workload, it will be inherited from your Kubeconfig context.How was this PR tested?
test/multi.yaml
file. Observed full cost diffs on dev cluster (KC deployed in nonstandard namespace) and a true diff on the nightly cluster, as expected.Have you made an update to documentation?
Yes, README update in this PR.