-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Division by zero in v0.6.0 #3
Comments
Hello,
The doc states in the Limitations section:
kubectl-vpa-recommendation/cli/command.go Line 229 in 8f936b6
Did you get logs about the VPA target kind being unsupported ? kubectl-vpa-recommendation/cli/table.go Line 299 in 8f936b6
I'll fix the panic. Regarding your use case, the plugin would need to be able to fetch any kind, tho this might cause other issues (a CRD with the https://github.com/wI2L/kubectl-vpa-recommendation/blob/master/vpa/target.go#L73 Do you mind sharing some information about the spec of your custom resources? |
gives a ton of Our CRD does have a scale subresource, so the newer versions of the vpa recommender force us to update our targets from the Deployments to the CRD. Our CRD has this in its Spec: Resources *corev1.ResourceRequirements `json:"resources"` So that is not the same like it is for deployments where resources are per container. For us it would be acceptable to let us add a command line option like --kind="KindName" --resourcePath=".spec.resources". Or some way of helping it resolve to the pod selectors themselves like what the recommender does. Maybe you can even depend on the recommender to steal this piece of code to get the selectors from the scale resource: https://github.com/kubernetes/autoscaler/blob/master/vertical-pod-autoscaler/pkg/target/fetcher.go#L119-L146 then you can map to the pods and grab the current resources from that. We define those as follows: +kubebuilder:subresource:scale:specpath=.spec.replicas,statuspath=.status.deployment.replicas,selectorpath=.status.scale.selector |
@EraYaN I'll fix the panic first, but to support custom target kinds, this will require a bit of refactor, and I won't have time to work on it immediately. If you are willing to work on it, let me know.
I don't think a Regarding the second flag, |
Alright I gave it a go in #4 |
Running:
kubectl vpa-recommendation --show-stats --output wide --sort-columns mem-diff,cpu-diff
I get the following error:
It seems like
meanQuantities chokes on some of our vpa's recommandations. I have dumped the vpas to yaml but there is a ton of internal info in those, so I'm not sure if I can share those.
Most of them have one container with something like this:
and a couple will have two containers.
EDIT: Alright
kubectl vpa-recommendation
doesn't actually return any VPAs. All our VPAs target a custom CRD, might that be the issue? Seems like it doesn't realize the number of matched VPAs is actually 0 because they are all targeting some unsupported kind.The text was updated successfully, but these errors were encountered: