Skip to content
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

Scheduled scaler failing to update HPA with Object metric type and Average Value #44

Open
apratina opened this issue Jan 20, 2022 · 3 comments
Assignees
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@apratina
Copy link

apratina commented Jan 20, 2022

We configured HPA with object metrics type along with average value. We are noting scheduled scaler is failing to update HPA configuration and it would fail with following error:

E0117 00:30:00.053071       1 scaling-controller.go:171] FAILED TO UPDATE HPA: <HPA_NAME> - HorizontalPodAutoscaler.autoscaling "<HPA_NAME>" is invalid: spec.metrics[1].object.target.value: Invalid value: resource.Quantity{i:resource.int64Amount{value:0, scale:0}, d:resource.infDecAmount{Dec:(*inf.Dec)(nil)}, s:"0", Format:"DecimalSI"}: must be positive

It seems to be related to this K8s HPA bug kubernetes/kubernetes#87733

Until K8s bug is fixed, we will run into issues.

Can we look into options to workaround the issue and add the necessary logic in scheduled-scaler code to handle this situation. Some work around has been mentioned in the issue kubernetes/kubernetes#87733

@ericuldall
Copy link
Contributor

Did you try the workaround? Any luck ?

@ericuldall
Copy link
Contributor

After a quick review of the code I imagine the issue may be that it's using an older version of the api. I'm not sure if that's going to be a problem in general or just for that workaround you shared. I'd be curious to see what if that workaround sticks after getting updated by the scheduled scaler.

@ericuldall ericuldall self-assigned this Mar 7, 2022
@ericuldall ericuldall added help wanted Extra attention is needed bug Something isn't working labels Mar 7, 2022
@NareshKoduru
Copy link

@ericuldall,
We are noticing this on the 1.29 version of the k8s cluster with HPA of v2 apiVersion.
Since I can patch the HPA object(adding a label) manually but schedulerScaler unable to make changes to minReplicas I thought of informing this here kubernetes/kubernetes#87733 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants