-
Notifications
You must be signed in to change notification settings - Fork 1.3k
fix: fix failing webhook check when targetRef doesn't exist #6842
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
base: main
Are you sure you want to change the base?
Conversation
9e7dfcb to
8f97d35
Compare
JorTurFer
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like this improvement, but I think that we should expose the new behavior via configuration, WDYT @wozniakjan ?
8f97d35 to
6e66524
Compare
Signed-off-by: y-rabie <[email protected]>
6e66524 to
044ed34
Compare
|
PTAL @kedacore/keda-core-contributors |
|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions. |
|
PTAL @kedacore/keda-core-contributors @kedacore/keda-core-maintainers |
Yeah, I tend to agree with this. |
|
@JorTurFer Configuration as in a field in ScaledObject, or a controller command-line option? I'm okay with the latter, the former not tbh because it'd just add clutter |
I think that as starting point, we can enable it as controller option at that's all, if end-users request more granular control, we can add by annotation or so in the future |
The PR's intent is to fix a behavior whereby the SO creation fails when the targetRef object does not exist, which seems to be a byproduct of verifying that container resources are set, not an intentional check. The following are my reasons:
Deployment/StatefulSet/etc.DeploymentorStatefulSet, the container resouce check doesn't handle it, it just returns and doesn't error out even if the target doesn't exist, which corroborates the view that the target's existence is not what is intentionally checked.Other few side changes:
containerName, which seems to be a reasonable check. A corresponding unit test is also added.LimitRangecase. The first of which (where noLimitRangeexist) is already covered in the above tests.verifyCPUMemoryScalersfunction is removed since it is duplicated.The autogenerated code changes are not part of my changes, it just seems that they weren't generated for the latest change on main.
Checklist