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 maxUnavailable to round down instead up #1076
Fix maxUnavailable to round down instead up #1076
Conversation
@@ -33,7 +33,7 @@ var ( | |||
depl2Replicas int32 = 5 | |||
|
|||
depl1MaxUnavailable = intstr.FromInt(10) | |||
depl2MaxUnavailable = intstr.FromString("20%") | |||
depl2MaxUnavailable = intstr.FromString("25%") |
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.
With rounding up, this will fail to produce the existing expected value of 1. With my change (rounding down) we still produce the existing expected value.
/assign @tariq1890 |
Thanks for fixing this @gregory-lyons. Can you point this to the |
@tariq1890 do you want me to rebase onto the top of release-1.9 branch? |
Yes please. |
79a37f3
to
9e517a1
Compare
/lgtm |
@tariq1890 was this "bug" introduced in the 1.9 branch? 🤔 |
@lilic fair point :). In that case, we could just retarget to master. |
@gregory-lyons sorry for the inconvenience; can we retarget this back to the master branch. |
9e517a1
to
89856b8
Compare
@tariq1890 no worries, updated it |
/hold cancel |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: gregory-lyons, tariq1890 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 |
The kube bot requires us to not have the "Fixes #..." type thing in the commit message. Can you remove that? Then we can merge this. |
Thanks @gregory-lyons :)! |
What this PR does / why we need it:
kube-state-metrics rounding logic should match Kubernetes rounding logic
Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close the issue(s) when PR gets merged):Fixes #1075