Skip to content

[release-4.22] OCPBUGS-85702: ctrl: sched: add topologySpreadConstraints to deployment#4265

Open
openshift-cherrypick-robot wants to merge 4 commits into
openshift-kni:release-4.22from
openshift-cherrypick-robot:cherry-pick-4177-to-release-4.22
Open

[release-4.22] OCPBUGS-85702: ctrl: sched: add topologySpreadConstraints to deployment#4265
openshift-cherrypick-robot wants to merge 4 commits into
openshift-kni:release-4.22from
openshift-cherrypick-robot:cherry-pick-4177-to-release-4.22

Conversation

@openshift-cherrypick-robot
Copy link
Copy Markdown

This is an automated cherry-pick of #4177

/assign shajmakh

/cherrypick release-4.21 release-4.20

shajmakh added 4 commits May 29, 2026 13:28
It's reasonable to have high-availability enabled to have scheduler pods
number matches the control-plane nodes' number or workers on hypershift.
but a number greater than that makes no point. This commit degrades the
scheduler status in case a higher number of replicas is requested.

Signed-off-by: Shereen Haj <shajmakh@redhat.com>
To evenly spread the pods across the nodes in a a balanced way taking
into account the new replicaset pods while rollout.

Signed-off-by: Shereen Haj <shajmakh@redhat.com>
The check includes many verification steps that only when all passed the
function pass. Sometimes the check fails without extra details of what
exactly was the step that failed. This commit adds debugging logs to
provide these details.

Signed-off-by: Shereen Haj <shajmakh@redhat.com>
So far the old function was waiting for the deployment to be ready with
the same replicas count as the old one. It is however possible that the
new deployment version includes a different replicas field hence should
expect to a different replicas count. The old version would fail on such
case where the old count vs the new one are not the same.
This commit fixes this issue by introducing new function that accepts the
expected new replicas count and compare against it.
The old function API still exists but is redirected to use the new
function with same old behavior.
Existing tests are not affected by this.

Signed-off-by: Shereen Haj <shajmakh@redhat.com>
@openshift-ci-robot
Copy link
Copy Markdown

@openshift-cherrypick-robot: Detected clone of Jira Issue OCPBUGS-79418 with correct target version. Will retitle the PR to link to the clone.
/retitle [release-4.22] OCPBUGS-85702: ctrl: sched: add topologySpreadConstraints to deployment

Details

In response to this:

This is an automated cherry-pick of #4177

/assign shajmakh

/cherrypick release-4.21 release-4.20

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci openshift-ci Bot requested review from Tal-or and mrniranjan May 29, 2026 13:28
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented May 29, 2026

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: openshift-cherrypick-robot
Once this PR has been reviewed and has the lgtm label, please assign yanirq for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci Bot changed the title [release-4.22] OCPBUGS-79418: ctrl: sched: add topologySpreadConstraints to deployment [release-4.22] OCPBUGS-85702: ctrl: sched: add topologySpreadConstraints to deployment May 29, 2026
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 29, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Enterprise

Run ID: 88990699-a14e-42bb-85f4-aea53e0beca7

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@openshift-ci-robot
Copy link
Copy Markdown

@openshift-cherrypick-robot: This pull request references Jira Issue OCPBUGS-85702, which is invalid:

  • expected the bug to be in one of the following states: NEW, ASSIGNED, POST, but it is MODIFIED instead

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

The bug has been updated to refer to the pull request using the external bug tracker.

Details

In response to this:

This is an automated cherry-pick of #4177

/assign shajmakh

/cherrypick release-4.21 release-4.20

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@yanirq
Copy link
Copy Markdown
Member

yanirq commented May 31, 2026

/hold

pre GA hold

@openshift-ci openshift-ci Bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label May 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants