-
Notifications
You must be signed in to change notification settings - Fork 752
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
cloneset ignore maxSurge when UpdateStrategyPaused=true #1324
Conversation
Signed-off-by: pingjaing <xiangpingjiang1998@gmail.com>
Signed-off-by: pingjaing <xiangpingjiang1998@gmail.com>
Codecov Report
❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more. @@ Coverage Diff @@
## master #1324 +/- ##
=======================================
Coverage 48.54% 48.54%
=======================================
Files 152 152
Lines 21240 21249 +9
=======================================
+ Hits 10310 10316 +6
- Misses 9801 9803 +2
- Partials 1129 1130 +1
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 2 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
@xiangpingjiang And you can add the following UT:
|
@xiangpingjiang Plz add these UTs {
name: "[UpdateStrategyPaused=true] create 0 newRevision pods with maxSurge=3,maxUnavailable=0",
set: setUpdateStrategyPaused(createTestCloneSet(5, intstr.FromInt(0), intstr.FromInt(0), intstr.FromInt(3)), true),
pods: []*v1.Pod{
createTestPod(oldRevision, appspub.LifecycleStateNormal, true, false),
createTestPod(oldRevision, appspub.LifecycleStateNormal, true, false),
createTestPod(oldRevision, appspub.LifecycleStateNormal, true, false),
createTestPod(oldRevision, appspub.LifecycleStateNormal, true, false),
createTestPod(oldRevision, appspub.LifecycleStateNormal, true, false),
createTestPod(newRevision, appspub.LifecycleStateNormal, false, false),
createTestPod(newRevision, appspub.LifecycleStateNormal, false, false),
createTestPod(newRevision, appspub.LifecycleStateNormal, false, false),
},
expectResult: expectationDiffs{scaleDownNum: 3, scaleDownNumOldRevision: 5, updateNum: 2, updateMaxUnavailable: 3},
},
{
name: "[UpdateStrategyPaused=true] create 0 newRevision pods with maxSurge=3,maxUnavailable=0",
set: setUpdateStrategyPaused(createTestCloneSet(5, intstr.FromInt(2), intstr.FromInt(0), intstr.FromInt(3)), true),
pods: []*v1.Pod{
createTestPod(oldRevision, appspub.LifecycleStateNormal, true, false),
createTestPod(oldRevision, appspub.LifecycleStateNormal, true, false),
createTestPod(oldRevision, appspub.LifecycleStateNormal, true, false),
createTestPod(oldRevision, appspub.LifecycleStateNormal, true, false),
createTestPod(oldRevision, appspub.LifecycleStateNormal, true, false),
createTestPod(newRevision, appspub.LifecycleStateNormal, false, false),
createTestPod(newRevision, appspub.LifecycleStateNormal, false, false),
createTestPod(newRevision, appspub.LifecycleStateNormal, false, false),
},
expectResult: expectationDiffs{scaleDownNum: 3, scaleDownNumOldRevision: 3},
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
Signed-off-by: pingjiang <xiangpingjiang1998@gmail.com>
/lgtm |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: zmberg The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
) * cloneset ignore maxSurge when UpdateStrategyPaused=true Signed-off-by: pingjaing <xiangpingjiang1998@gmail.com> * add scale down UT case for cloneSet UpdateStrategyPaused=true Signed-off-by: pingjaing <xiangpingjiang1998@gmail.com> * add UTs for cloneSet when UpdateStrategyPaused=true Signed-off-by: pingjiang <xiangpingjiang1998@gmail.com> --------- Signed-off-by: pingjaing <xiangpingjiang1998@gmail.com> Signed-off-by: pingjiang <xiangpingjiang1998@gmail.com>
) * cloneset ignore maxSurge when UpdateStrategyPaused=true Signed-off-by: pingjaing <xiangpingjiang1998@gmail.com> * add scale down UT case for cloneSet UpdateStrategyPaused=true Signed-off-by: pingjaing <xiangpingjiang1998@gmail.com> * add UTs for cloneSet when UpdateStrategyPaused=true Signed-off-by: pingjiang <xiangpingjiang1998@gmail.com> --------- Signed-off-by: pingjaing <xiangpingjiang1998@gmail.com> Signed-off-by: pingjiang <xiangpingjiang1998@gmail.com>
Ⅰ. Describe what this PR does
Ⅱ. Does this pull request fix one issue?
fixes #1153
Ⅲ. Describe how to verify it
Ⅳ. Special notes for reviews