Skip to content

Feature: enhanced maxSurge performance #1929

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

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

AiRanthem
Copy link
Member

@AiRanthem AiRanthem commented Feb 18, 2025

Ⅰ. Describe what this PR does

CloneSet can retain both old and new version Pods simultaneously in some upgrade scenarios (such as blue-green release) by setting minReadySeconds to a sufficiently large value along with a suitable maxSurge. However, during the above upgrade process, it's not possible to dynamically adjust the number of new Pods by changing maxSurge in real-time. This update adds such capability to CloneSet.

Ⅱ. Does this pull request fix one issue?

fixes #1666

Ⅲ. Describe how to verify it

change maxSurge while updating

# 50%
+-------------+---------+-----------+
|     name    | version | lifecycle |
+-------------+---------+-----------+
| sleep-857br |    v1   |   Normal  |
| sleep-8w5f2 |    v1   |   Normal  |
| sleep-lhl5l |    v1   |   Normal  |
| sleep-wr29m |    v1   |   Normal  |
| sleep-bv7s7 |    v2   |   Normal  |
| sleep-dfg6c |    v2   |   Normal  |
+-------------+---------+-----------+
# 50% -> 100%
+-------------+---------+-----------+
|     name    | version | lifecycle |
+-------------+---------+-----------+
| sleep-857br |    v1   |   Normal  |
| sleep-8w5f2 |    v1   |   Normal  |
| sleep-lhl5l |    v1   |   Normal  |
| sleep-wr29m |    v1   |   Normal  |
| sleep-bv7s7 |    v2   |   Normal  |
| sleep-dfg6c |    v2   |   Normal  |
| sleep-pht8b |    v2   |   Normal  |
| sleep-wxw8t |    v2   |   Normal  |
+-------------+---------+-----------+
# 100% -> 25%
+-------------+---------+-----------+
|     name    | version | lifecycle |
+-------------+---------+-----------+
| sleep-857br |    v1   |   Normal  |
| sleep-8w5f2 |    v1   |   Normal  |
| sleep-lhl5l |    v1   |   Normal  |
| sleep-wr29m |    v1   |   Normal  |
| sleep-dfg6c |    v2   |   Normal  |
+-------------+---------+-----------+
# minReadySeconds 9999 -> 0
+-------------+---------+-----------+
|     name    | version | lifecycle |
+-------------+---------+-----------+
| sleep-ckhpn |    v2   |   Normal  |
| sleep-dfg6c |    v2   |   Normal  |
| sleep-hjjks |    v2   |   Normal  |
| sleep-qjx5f |    v2   |   Normal  |
+-------------+---------+-----------+

Ⅳ. Special notes for reviews

@AiRanthem
Copy link
Member Author

DON'T REVIEW This PR is a draft for running E2E tests as I cannot pull the images locally

Signed-off-by: AiRanthem <[email protected]>
@kruise-bot
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign zmberg for approval by writing /assign @zmberg in a comment. For more information see:The Kubernetes Code Review Process.

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

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

@kruise-bot kruise-bot added the size/L size/L: 100-499 label Apr 3, 2025
@kruise-bot
Copy link

@AiRanthem: PR needs rebase.

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/test-infra repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-rebase size/L size/L: 100-499
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] modifying maxSurge doesn't work under some settings
2 participants