Skip to content
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

fix: Do not disable fallback if the metric type is not explicitly configured #6065

Conversation

salvacorts
Copy link

The fallback mechanism should only work if the metric type is AverageValue, which is the default (according to the docs).

Problem is, if you do not explicitly declare the metric type, KEDA prints the following error and disables the fallback mechanism:

2024-08-02T15:01:04Z ERROR scaledobject-validation-webhook validation error {"name": "foo", "error": "MetricType=, but Fallback can only be enabled for triggers with metric of type AverageValue"}

This PR fixes this by checking if the metric type is empty, in which case it's evaluated as AverageValue.

Checklist

Fixes #

Relates to #

@salvacorts salvacorts requested a review from a team as a code owner August 12, 2024 14:22
…figured

Signed-off-by: Salva Corts <salva.corts@grafana.com>
@salvacorts salvacorts force-pushed the salvacorts/fix-check-fallback-default-value branch from 1c1ff6a to 3e4ed77 Compare August 12, 2024 14:23
@salvacorts
Copy link
Author

salvacorts commented Aug 12, 2024

I just noticed this one is already open #5962 and addressing something similar. So we should address this there.

I'll close this one but briefly reviewing the already opened one, I find a function that get the metric or returns the configured would be handy.

Closing!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant