You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have a dev project that has workloads and is also the scoping project for other environments. Due to this, the metric client will sometimes send back the backlog size of one of the monitored projects instead of the project itself
Expected Behavior
I'd expect the backlog size to be for the project the pub/sub subscription is in
Actual Behavior
data from the metrics client is not filtering on the project itself so it will give back num_undelivered_messages for multiple projects in this metric scoped project. This leads to the keda operator to not increase scale from 0 since it sees no messages in the backlog
Steps to Reproduce the Problem
setup a gcp project that contains a topic/subscription
setup a secondary project with the same topic/subscription
scope project 2 metrics to project 1
run keda in a cluster in project 1, create a scaled object to scale on the subscription created in step 1/2
add messages to step 1's topic
see behavor where it may sometimes not see the backlog if there is no backlog in project 2
Since we have this info already we should be able to extend the filter to include resource.labels.project_id while preserving current functionality. It looks redundant in most cases but fixes this issue we're seeing
The text was updated successfully, but these errors were encountered:
Report
We have a dev project that has workloads and is also the scoping project for other environments. Due to this, the metric client will sometimes send back the backlog size of one of the monitored projects instead of the project itself
Expected Behavior
I'd expect the backlog size to be for the project the pub/sub subscription is in
Actual Behavior
data from the metrics client is not filtering on the project itself so it will give back
num_undelivered_messages
for multiple projects in this metric scoped project. This leads to the keda operator to not increase scale from 0 since it sees no messages in the backlogSteps to Reproduce the Problem
Logs from KEDA operator
screen shot at the time where project1 had 7k backlog with the other projects having 0
KEDA Version
2.12.0
Kubernetes Version
1.27
Platform
Google Cloud
Scaler Details
GCP pubsub scaler
Anything else?
It looks like this should be easily fixed by adding in the project Id to the filter here:
https://github.com/kedacore/keda/blob/main/pkg/scalers/gcp_pubsub_scaler.go#L195
Since we have this info already we should be able to extend the filter to include
resource.labels.project_id
while preserving current functionality. It looks redundant in most cases but fixes this issue we're seeingThe text was updated successfully, but these errors were encountered: