Skip to content

rfac: handle paused scaling directly in reconciler#7664

Merged
rickbrouwer merged 2 commits into
kedacore:mainfrom
rickbrouwer:paused
May 7, 2026
Merged

rfac: handle paused scaling directly in reconciler#7664
rickbrouwer merged 2 commits into
kedacore:mainfrom
rickbrouwer:paused

Conversation

@rickbrouwer

@rickbrouwer rickbrouwer commented Apr 18, 2026

Copy link
Copy Markdown
Member

The ScaledObject reconciler now handles the full pause lifecycle: stop scale loop, delete HPA, and scale the target directly via the scale subresource instead of recreating an HPA with min=max=N. This applies consistently to both paused and paused-replicas annotations.

Also aligned the ScaledJob pause flow with the same status-first pattern and idempotent scale loop stopping.
Added e2e tests for HPA absence during pause, annotation value changes and annotation switching while paused.

Checklist

  • I have verified that my change is according to the deprecations & breaking changes policy
  • Tests have been added (if applicable)
  • Ensure make generate-scalers-schema has been run to update any outdated generated files
  • Changelog has been updated and is aligned with our changelog requirements, only when the change impacts end users
  • Commits are signed with Developer Certificate of Origin (DCO - learn more)

Fixes #7663

@github-actions

Copy link
Copy Markdown

Thank you for your contribution! 🙏

Please understand that we will do our best to review your PR and give you feedback as soon as possible, but please bear with us if it takes a little longer as expected.

While you are waiting, make sure to:

  • Add an entry in our changelog in alphabetical order and link related issue
  • Update the documentation, if needed
  • Add unit & e2e tests for your changes
  • GitHub checks are passing
  • Is the DCO check failing? Here is how you can fix DCO issues

Once the initial tests are successful, a KEDA member will ensure that the e2e tests are run. Once the e2e tests have been successfully completed, the PR may be merged at a later date. Please be patient.

Learn more about our contribution guide.

@keda-automation keda-automation requested review from a team April 18, 2026 19:31
@snyk-io

snyk-io Bot commented Apr 18, 2026

Copy link
Copy Markdown

Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@rickbrouwer

rickbrouwer commented Apr 18, 2026

Copy link
Copy Markdown
Member Author

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

@rickbrouwer

rickbrouwer commented Apr 18, 2026

Copy link
Copy Markdown
Member Author

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

@rickbrouwer rickbrouwer marked this pull request as ready for review April 19, 2026 06:57
@rickbrouwer rickbrouwer mentioned this pull request Apr 20, 2026
22 tasks
Comment thread pkg/scaling/executor/scale_scaledobjects.go Outdated
Comment thread controllers/keda/scaledobject_controller.go Outdated
Signed-off-by: Rick Brouwer <[email protected]>
@keda-automation keda-automation requested a review from a team April 21, 2026 09:13
@rickbrouwer rickbrouwer added the Awaiting/2nd-approval This PR needs one more approval review label Apr 21, 2026
@rickbrouwer

rickbrouwer commented Apr 21, 2026

Copy link
Copy Markdown
Member Author

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

@rickbrouwer rickbrouwer added the required:keda-v2.20 This is absolutely mandatory to bring along label May 4, 2026
@rickbrouwer rickbrouwer merged commit 7d7a8ff into kedacore:main May 7, 2026
27 checks passed
@rickbrouwer rickbrouwer deleted the paused branch May 7, 2026 10:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Awaiting/2nd-approval This PR needs one more approval review required:keda-v2.20 This is absolutely mandatory to bring along

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Inconsistent HPA lifecycle and race conditions in ScaledObject pause handling

3 participants