-
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
Make GCP PubSub Scaler more flexible #4243
Comments
I see #4239 is already open - Just for future reference; you might want to wait until we give the go in case we want another approach |
Hi, in general I like the idea!
which default values do you mean? |
There are default values for each metric currently. But I think it's no big deal. We could probably set an arbitrary number as the default value. keda/pkg/scalers/gcp_pubsub_scaler.go Lines 20 to 21 in 38a0e1c
|
Hi @JorTurFer, I see you've moved this issue to the To Do section. Am I able to draft a PR now? 😄 |
Hey, |
Proposal
Recently we are adopting KEDA due to its rich scalers, which are fantastic.
There are a bunch of workloads that need to be scaled by GCP PubSub. One of metrics we used is
pubsub.googleapis.com/subscription/pull_ack_request_count
, which is not supported by KEDA.According to the current design, if we want to add support to new metrics1, what we do is mostly like #4239.
Thus, in order to make it more flexible, I would like to propose a new way for
pubsubScaler
. Perhaps we don't need to hardcode metrics, instead, we convert themode
defined in theScaledObject
CRD.For example, it is the scaled object manifest below.
Simply convert
PullAckRequestCount
(camel case) topull_ack_request_count
(snake case), and concatenate it withpubsub.googleapis.com/subscription/
, then we get the full metric name.I'm not sure if it's a good design. Need to discuss this with the community.
BTW, another concern is that it's hard to define default values in this way, people won't use default values in real cases though. Maybe it's okay to give an arbitrary number, e.g. 5.
Use-Case
No response
Is this a feature you are interested in implementing yourself?
Yes
Anything else?
No response
Footnotes
https://cloud.google.com/monitoring/api/metrics_gcp#gcp-pubsub ↩
The text was updated successfully, but these errors were encountered: