-
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
ScaledObject with multiple triggers with non unique name should be rejected at creation #4664
Comments
Hi, keda/pkg/scalers/cron_scaler.go Lines 130 to 140 in d993d61
|
@JorTurFer this is not a metric name, but trigger name (optional) used for prometheus metrics. The issue is correct, we should add a validation check. |
oh f**k, got it. |
@JorTurFer I am already fixing this, so will assign to me. |
Lol, I have it almost done too xD |
great minds think alike 😄 |
Thanks for the fix! |
Report
Hi,
We just upgraded from Keda 2.5 to 2.10.0. We have
ScaledObject
with multiple triggers with non-unique name. This change was introduced to ensure names are unique amongst all triggers in aScaledObject
.We were not aware about this change until we saw the following error logs on our end:
After investigation we found out few of our
ScaledObject
indeed have multiple times the same name, such as the following one:We understand the change, so we removed the
name
from the triggers as it's an optional field.We do think, there is a bug as we are still able to create a
ScaledObject
with non unique trigger names with2.10.0
. This is actually pretty confusing as the object would be created properly, but the underlying HPA would never be created or reconciled. So it is misleading. Could you please ensure aScaledObject
with multiple triggers with non unique name is rejected at creation? Thanks.Expected Behavior
A
ScaledObject
with non unique trigger name should be rejected at creation.Actual Behavior
A
ScaledObject
with non unique trigger name can be created, then the underlying HPA is never created or reconciled.Steps to Reproduce the Problem
Logs from KEDA operator
I replaced our service-name in the logs.
KEDA Version
2.10.0
Kubernetes Version
1.24
Platform
Amazon Web Services
Scaler Details
cpu/memory/cron
Anything else?
No response
The text was updated successfully, but these errors were encountered: