Skip to content

[4.21] OCPBUGS-79418: ctrl: sched: add topologySpreadConstraints to deployment#4307

Open
shajmakh wants to merge 4 commits into
openshift-kni:release-4.21from
shajmakh:bp-fix-bug-79418
Open

[4.21] OCPBUGS-79418: ctrl: sched: add topologySpreadConstraints to deployment#4307
shajmakh wants to merge 4 commits into
openshift-kni:release-4.21from
shajmakh:bp-fix-bug-79418

Conversation

@shajmakh
Copy link
Copy Markdown
Member

@shajmakh shajmakh commented Jun 2, 2026

manual backport of #4177.

@openshift-ci-robot
Copy link
Copy Markdown

@shajmakh: This pull request references Jira Issue OCPBUGS-79418, which is invalid:

  • expected the bug to target either version "4.21." or "openshift-4.21.", but it targets "5.0.0" instead
  • expected the bug to be in one of the following states: NEW, ASSIGNED, POST, but it is MODIFIED instead
  • release note text must be set and not match the template OR release note type must be set to "Release Note Not Required". For more information you can reference the OpenShift Bug Process.
  • expected Jira Issue OCPBUGS-79418 to depend on a bug targeting a version in 4.22.0 and in one of the following states: VERIFIED, RELEASE PENDING, CLOSED (ERRATA), CLOSED (CURRENT RELEASE), CLOSED (DONE), CLOSED (DONE-ERRATA), but no dependents were found

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:

manual backport of #4177.

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 ffromani and mrniranjan June 2, 2026 11:33
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Jun 2, 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: 31a012aa-13f5-4500-b6cd-20ed56c1288f

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.

shajmakh added 4 commits June 2, 2026 14:33
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>
(cherry picked from commit 9a2cee9)
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>
(cherry picked from commit e192eb5)
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>
(cherry picked from commit 9a8f010)
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>
(cherry picked from commit f30a924)
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented Jun 2, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: shajmakh

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

The pull request process is described 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 added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 2, 2026
@shajmakh shajmakh force-pushed the bp-fix-bug-79418 branch from 9903dc3 to bf2c76a Compare June 2, 2026 11:33
@shajmakh
Copy link
Copy Markdown
Member Author

shajmakh commented Jun 2, 2026

/hold
for QE verification on new releases

@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 Jun 2, 2026
@shajmakh
Copy link
Copy Markdown
Member Author

shajmakh commented Jun 2, 2026

/cherry-pick release-4.20

@openshift-cherrypick-robot
Copy link
Copy Markdown

@shajmakh: once the present PR merges, I will cherry-pick it on top of release-4.20 in a new PR and assign it to you.

Details

In response to this:

/cherry-pick 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 kubernetes-sigs/prow repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. 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.

3 participants