-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
GCP Pub/Sub Scaler reports negative metric values #5774
Comments
Hello |
Interesting information, so we are getting somehow negative values from Pub/Sub api somehow, maybe it's because the aggregation window or something so that we use is not correct. Could it be possible? Are you willing to take a look? This is the relevant part of scaler code (and other calls executed within it): keda/pkg/scalers/gcp_pubsub_scaler.go Lines 236 to 256 in a168022
|
Not a Golang expert by any means, but I can take a look. It would be great if someone with more expertise could take a look as well. |
Let's see if there is any other folk willing to help here too :) |
@JorTurFer Thanks for the initial triage of this issue! It looks like we were receiving negative values because we were mistakenly passing the Once we removed the |
Nice to read that it's working well 😄 Thanks a lot for the feedback! |
We still have a problem without any aggregation function defined, we sometimes get Apparently it also happens when using kafka on GCP #5730 |
Report
We have configured the GCP Pub/Sub Scaler to scale our deployments based on the reported "SubscriptionSize" of the configured Pub/Sub Subscription. We have experienced frequent reporting of negative metric values by the underlying
HorizontalPodAutoscaler
resource for eachScaledObject
.The reported negative values seems to be having the adverse affect of incorrectly scaling down our deployments.
Examples:
Scaler Config:
Expected Behavior
There should not be any negative values reported for the
HorizontalPodAutoscaler
metric.Actual Behavior
Observed the
HorizontalPodAutoscaler
consistently reporting negative values.Steps to Reproduce the Problem
Logs from KEDA operator
No response
KEDA Version
2.13.0
Kubernetes Version
1.28
Platform
Amazon Web Services
Scaler Details
GCP Pub/Sub
Anything else?
No response
The text was updated successfully, but these errors were encountered: