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: Validate empty array value of triggers in ScaledObject/ScaledJob creation #5524

Merged

Conversation

SpiritZhou
Copy link
Contributor

Add validation in ValidateTriggers() to prevent an empty array value of triggers so that some unexpected HPA will not be created

Checklist

  • Tests have been added
  • Changelog has been updated and is aligned with our changelog requirements
  • Commits are signed with Developer Certificate of Origin (DCO - learn more)

Fixes #

Relates to # #5520

Signed-off-by: SpiritZhou <iammrzhouzhenghan@gmail.com>
@SpiritZhou SpiritZhou requested a review from a team as a code owner February 21, 2024 03:46
@zroubalik
Copy link
Member

zroubalik commented Feb 21, 2024

/run-e2e internal
Update: You can check the progress here

@SpiritZhou
Copy link
Contributor Author

SpiritZhou commented Feb 22, 2024

/run-e2e internal
Update: You can check the progress here

@JorTurFer
Copy link
Member

Can we extend this PR to cover ScaledJobs too?

Signed-off-by: SpiritZhou <iammrzhouzhenghan@gmail.com>
Signed-off-by: SpiritZhou <iammrzhouzhenghan@gmail.com>
@SpiritZhou SpiritZhou changed the title fix: Validate empty array value of triggers in ScaledObject creation fix: Validate empty array value of triggers in ScaledObject/ScaledJob creation Feb 28, 2024
@SpiritZhou
Copy link
Contributor Author

Can we extend this PR to cover ScaledJobs too?

Extended ScaledJob too

@zroubalik
Copy link
Member

zroubalik commented Mar 2, 2024

/run-e2e internal
Update: You can check the progress here

Copy link
Member

@zroubalik zroubalik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please also add a validation into controllers? in case webhooks are disabled. Thanks!

Signed-off-by: SpiritZhou <iammrzhouzhenghan@gmail.com>
Signed-off-by: SpiritZhou <iammrzhouzhenghan@gmail.com>
@SpiritZhou
Copy link
Contributor Author

Could you please also add a validation into controllers? in case webhooks are disabled. Thanks!

Added a validation in the controller

@SpiritZhou
Copy link
Contributor Author

SpiritZhou commented Mar 4, 2024

/run-e2e internal
Update: You can check the progress here

Signed-off-by: SpiritZhou <iammrzhouzhenghan@gmail.com>
@SpiritZhou
Copy link
Contributor Author

SpiritZhou commented Mar 4, 2024

/run-e2e internal
Update: You can check the progress here

Copy link
Member

@zroubalik zroubalik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@zroubalik zroubalik merged commit 6c94347 into kedacore:main Mar 4, 2024
20 checks passed
SpiritZhou added a commit to SpiritZhou/keda that referenced this pull request Mar 15, 2024
… creation (kedacore#5524)

Signed-off-by: SpiritZhou <iammrzhouzhenghan@gmail.com>
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.

3 participants