Ensure that all query based scalers handles multiple triggers correctly #1473
Labels
feature-request
All issues for new features that have not been committed to
needs-discussion
stale
All issues that are marked as stale due to inactivity
If there are multiple triggers in the ScaledObject, we need to be sure, that
metricName
used inGetMetricSpecForScaling()
for each scaler returns uniquemetricName
for the particualar ScaledObject. Most of the scalers should handle this correctly, as themetricName
is usually based on a queue name or similar value. ThemetricName
value should be immutable, eg. should be the same for the whole lifetime of the particular ScaledObject.Query based scalers could be more problematic, because there's not an appropriate unique value that can be used as a base for the
metricName
, the query itself is usually quite long.Some scalers are trying to handle this by allowing users to specify the
metricName
value, so they could distiguish the value manually (PostrgreSQL or InfluxDB).Docs:
https://keda.sh/docs/2.1/scalers/postgresql/
https://keda.sh/docs/2.1/scalers/influxdb/
We should revisit all query based scalers and ensure that they handle this correctly and the same way both in the code and in the docs.
Relevant scalers:
We might think about how to make this the most convenient for users as it could be, eg. try to find a solution without a need for specification of metricName manually, maybe a short hash of the query?
This PR is adding a check, that all
metricNames
per ScaledObject are unique: #1390The text was updated successfully, but these errors were encountered: