-
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
Add support for the "Value" metric type in addition to "AverageValue" #2030
Comments
Thanks for raising this issue 🎉 This is generally useful feature, I have a few remarks:
Do you think that you can join our community call and discuss this feature there? Details: https://keda.sh/community/ |
Thank you @zroubalik for responding and for the good remarks! I will be happy to join the next community call to discuss this. Should I just hop on the call or sign myself up somewhere? |
Great, no need to sign anywhere. The call is open for everyone :) |
Hey guys. I am also looking forward to seeing this feature released. So +1 |
Hi @amirschw , I don't know if you start to implements feature. In the meantime I've written POC for my case Tell me how do you want go head, when you finish I will happy to test it |
Hey @fbalicchia, thanks for sharing your POC and apologies for the delay, I just got back from a long vacation (Jewish holidays... 😄). I should hopefully have time to get back to this soon. |
Just got back to this issue now. I hope to have at least a draft PR by tomorrow. |
@zroubalik, @sqerison, @fbalicchia, here's the PR: #2309. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions. |
This issue has been automatically closed due to inactivity. |
Hello folks! Currently searching for a way to use value instead of averageValue for Prometheus trigger. Thanks a lot for your work, you folks definitely make our lives easier. |
Same here, would be happy to test it |
Proposal
Except for the CPU and memory scalers, all scalers, including the external scaler, only support the
averageValue
metric type. The proposal is to allow for other metric types (specificallyvalue
).Edit: Apparently,
Utilization
is not supported for external metrics, so the proposal is only to support theValue
metric type in addition toAverageValue
.Use-Case
There are already a few related issues with some use cases:
Our use case is the following. We currently use the Azure Service Bus scaler for scaling one of our workloads. We would like to add another trigger (with an external scaler) that will scale the deployment based on the latency of the queue workers or the average dequeue delta. For this we need the absolute metric value in milliseconds and not the average value across all pods (e.g. we want to scale out when average latency is greater than 500ms).
Anything else?
The CPU and memory scalers already support different metric types by setting a required
type
in the scaled object metadata:keda/pkg/scalers/cpu_memory_scaler.go
Lines 42 to 68 in b27de0c
If we want to make this more generic, another approach can be to add the metric type to the trigger spec. Something like the below for example. The default metric type can be
averageValue
for maintaining backward compatibility.After we discuss and agree on the approach we will be happy to contribute this.
The text was updated successfully, but these errors were encountered: