Support for expanded metric scopes in GCP Stackdriver scaler #6847
Unanswered
marcos07-uy
asked this question in
Q&A / Need Help
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I'm working with KEDA in a GCP environment and ran into a limitation with the current GCP Stackdriver scaler regarding federated metrics and expanded metric scopes.
We want to configure a ScaledObject that reads a metric from Project A, but that metric is federated — it's originally collected in Project B, and made visible in Project A through GCP's Monitoring Workspace metric scoping.
Although the metric is visible in Project A (and queryable through the Monitoring API or GCP console), the KEDA GCP Stackdriver scaler currently fails to read it. This is because the scaler constructs the query assuming that the metric is local to the projectId defined in the metadata, and it hardcodes that project into the filter (e.g., via resource.labels.project_id = "project-a").
code
keda/pkg/scalers/gcp/gcp_stackdriver_client.go
Line 250 in e25ab90
This causes the scaler to return no results, since the actual source project of the metric is different.
Questions:
Thanks!
--Marcos
Beta Was this translation helpful? Give feedback.
All reactions