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

scale to zero with cpu/mem scaler #4346

Merged
merged 8 commits into from
Mar 17, 2023
Merged

Conversation

gauron99
Copy link
Contributor

@gauron99 gauron99 commented Mar 9, 2023

add option to scale to zero with cpu/mem triggers when:

  • SO has atleast one external trigger

if SO has no external triggers, only cpu/mem triggers AND minReplicas is not set or is 0 - return error in so creation/validation

Checklist

(https://github.com/kedacore/governance/blob/main/SCALERS.md)

docs PR: kedacore/keda-docs#1088

Fixes #4269

@gauron99 gauron99 force-pushed the scale-to-zero-4269 branch from 6c8efb3 to 6749faf Compare March 9, 2023 15:28
@zroubalik
Copy link
Member

zroubalik commented Mar 9, 2023

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

@gauron99
Copy link
Contributor Author

gauron99 commented Mar 9, 2023

try running the test again pls 🙏 Ive finalized it

@zroubalik
Copy link
Member

zroubalik commented Mar 9, 2023

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

@gauron99 gauron99 force-pushed the scale-to-zero-4269 branch 2 times, most recently from e54ee86 to f102fff Compare March 9, 2023 21:48
@zroubalik
Copy link
Member

zroubalik commented Mar 10, 2023

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

@zroubalik
Copy link
Member

zroubalik commented Mar 10, 2023

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

@gauron99
Copy link
Contributor Author

sorry i had to redo the tests a few times, example-hpa image doesnt work for me in ocp for some reason when im trying to test it so im doing it kind of blind. It should be fixed now, if you could please run both tests again 🙏

@tomkerkhove
Copy link
Member

tomkerkhove commented Mar 13, 2023

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

@zroubalik
Copy link
Member

zroubalik commented Mar 13, 2023

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

@gauron99 gauron99 marked this pull request as ready for review March 13, 2023 12:59
@gauron99 gauron99 requested a review from a team as a code owner March 13, 2023 12:59
@gauron99 gauron99 force-pushed the scale-to-zero-4269 branch 2 times, most recently from 31c224c to 33fedf4 Compare March 14, 2023 08:25
@tomkerkhove
Copy link
Member

tomkerkhove commented Mar 14, 2023

/run-e2e cpu*

Update: You can check the progress here

@zroubalik
Copy link
Member

zroubalik commented Mar 14, 2023

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

@tomkerkhove
Copy link
Member

tomkerkhove commented Mar 14, 2023

/run-e2e memory*

Update: You can check the progress here

@tomkerkhove
Copy link
Member

tomkerkhove commented Mar 14, 2023

/run-e2e memory*

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.

In the test output I can read:

No test has been executed, please review your regex: 'memory*

it is strange though 🤷‍♂️

@zroubalik
Copy link
Member

zroubalik commented Mar 14, 2023

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

@gauron99
Copy link
Contributor Author

It looks like there was some whitespace characters (newlines?) after the /run-e2e memory* text which messed up with the regex matching - i made a PR #4363

@JorTurFer
Copy link
Member

It looks like there was some whitespace characters (newlines?) after the /run-e2e memory* text which messed up with the regex matching - i made a PR #4363

Yeah, it's a known bug that we forget from time to time xD
If the comment has a new line, the regex fails

@gauron99 gauron99 force-pushed the scale-to-zero-4269 branch from 33fedf4 to 18c9800 Compare March 14, 2023 12:44
@tomkerkhove
Copy link
Member

It looks like there was some whitespace characters (newlines?) after the /run-e2e memory* text which messed up with the regex matching - i made a PR #4363

Yeah, it's a known bug that we forget from time to time xD If the comment has a new line, the regex fails

Jorge has to always remind me about this because I'm sloppy - Sorry!

@gauron99 gauron99 force-pushed the scale-to-zero-4269 branch 2 times, most recently from ab7d6ff to 4b5d96c Compare March 15, 2023 07:47
@zroubalik
Copy link
Member

zroubalik commented Mar 15, 2023

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

cmd/operator/main.go Outdated Show resolved Hide resolved
cmd/webhooks/main.go Outdated Show resolved Hide resolved
controllers/keda/suite_test.go Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
apis/keda/v1alpha1/scaledobject_webhook.go Outdated Show resolved Hide resolved
apis/keda/v1alpha1/scaledobject_webhook.go Outdated Show resolved Hide resolved
pkg/scaling/scale_handler.go Outdated Show resolved Hide resolved
Signed-off-by: gauron99 <fridrich.david19@gmail.com>
Signed-off-by: gauron99 <fridrich.david19@gmail.com>
Signed-off-by: gauron99 <fridrich.david19@gmail.com>
Signed-off-by: gauron99 <fridrich.david19@gmail.com>
Signed-off-by: gauron99 <fridrich.david19@gmail.com>
Signed-off-by: gauron99 <fridrich.david19@gmail.com>
Signed-off-by: gauron99 <fridrich.david19@gmail.com>
@zroubalik
Copy link
Member

zroubalik commented Mar 15, 2023

/run-e2e memory*
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
Copy link
Member

zroubalik commented Mar 16, 2023

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

@JorTurFer
Copy link
Member

I'll check this during the day

Copy link
Member

@JorTurFer JorTurFer left a comment

Choose a reason for hiding this comment

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

Looking good. Some comments inline

.golangci.yml Show resolved Hide resolved
pkg/scaling/scale_handler.go Outdated Show resolved Hide resolved
Signed-off-by: gauron99 <fridrich.david19@gmail.com>
@zroubalik
Copy link
Member

zroubalik commented Mar 17, 2023

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

Copy link
Member

@JorTurFer JorTurFer left a comment

Choose a reason for hiding this comment

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

LGTM!

@zroubalik zroubalik enabled auto-merge (squash) March 17, 2023 08:36
@zroubalik zroubalik merged commit b1b1be1 into kedacore:main Mar 17, 2023
xoanmm pushed a commit to xoanmm/keda that referenced this pull request Mar 22, 2023
Signed-off-by: gauron99 <fridrich.david19@gmail.com>
@gauron99 gauron99 deleted the scale-to-zero-4269 branch September 24, 2023 11:03
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.

Support scaling to Zero with combine of Cron and cpu/mem scaler
4 participants