-
Notifications
You must be signed in to change notification settings - Fork 38.7k
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
Fix HPA bug about unintentional scale out during updating deployment. #85027
Fix HPA bug about unintentional scale out during updating deployment. #85027
Conversation
Welcome @shibataka000! |
Hi @shibataka000. Thanks for your PR. I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. 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. |
During rolling update with maxSurge=1 and maxUnavailable=0, len(metrics) is greater than currentReplcas and it may cause unintentional scale out.
e4a0818
to
b712277
Compare
/ok-to-test |
/assign @piosz |
@piosz Could you review this PR? |
/lgtm @shibataka000 can you apply this fix to Thank you for this pull request! |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: josephburnett, shibataka000 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 |
/test pull-kubernetes-e2e-gce |
This commit fix bug in calcPlainMetricReplicas function. Same bug in GetResourceReplicas function was fixed in kubernetes#85027.
@josephburnett Thank you for your review!
I did it in #89465 . Could you review it? |
@shibataka000 sure think, I will review once the automated tests finish. |
…-#85027-upstream-release-1.17 Automated cherry pick of #85027: Fix bug about unintentional scale out during updating
…-#85027-upstream-release-1.16 Automated cherry pick of #85027: Fix bug about unintentional scale out during updating
…-#85027-upstream-release-1.18 Automated cherry pick of #85027: Fix bug about unintentional scale out during updating
…-#85027-upstream-release-1.15 Automated cherry pick of #85027: Fix bug about unintentional scale out during updating
This commit fix bug in calcPlainMetricReplicas function. Same bug in GetResourceReplicas function was fixed in kubernetes#85027.
This commit fix bug in calcPlainMetricReplicas function. Same bug in GetResourceReplicas function was fixed in kubernetes#85027.
Fix bug about unintentional scale out during updating deployment. **MR 描述 / 目的**: Fix bug about unintentional scale out during updating deployment. This commit fix bug in calcPlainMetricReplicas function. Same bug in GetResourceReplicas function was fixed in kubernetes#85027. **关联 issue**: Fixes # **代码审查须知**: **MR 是否对用户有影响?**: ```发布须知 ```
This commit fix bug in calcPlainMetricReplicas function. Same bug in GetResourceReplicas function was fixed in kubernetes#85027.
What type of PR is this?
/kind bug
What this PR does / why we need it:
During rolling update with
maxSurge: 1
andmaxUnavailable: 0
,len(metrics)
may be greater thancurrentReplcas
and it may cause unintentional scale out in spite ofusageRatio
andnewUsageRatio
are less than1.0
. This PR fix that bug.More detail scenario description and the way to reproduce bug is described in #84142 . Please see it.
Which issue(s) this PR fixes:
Fixes #84142
Special notes for your reviewer:
Does this PR introduce a user-facing change?:
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: