-
Notifications
You must be signed in to change notification settings - Fork 880
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!: improve basic canary approximation accuracy and honor maxSurge #1759
Conversation
30e45d9
to
6208ff4
Compare
Codecov Report
@@ Coverage Diff @@
## master #1759 +/- ##
==========================================
+ Coverage 82.02% 82.05% +0.02%
==========================================
Files 116 116
Lines 16096 16212 +116
==========================================
+ Hits 13203 13303 +100
- Misses 2218 2229 +11
- Partials 675 680 +5
Continue to review full report at Codecov.
|
@jessesuen Thanks for all your help with this issue! Much appreciate that! |
Signed-off-by: Jesse Suen <[email protected]>
6208ff4
to
22b2e01
Compare
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
LGTM. 2 e2e tests are failing. I wanted to confirm if they are flaky or not. can you please retrigger e2e or confirm they are good from local if you have already validated them. Thanks |
it was due to flake. It actually passed in prev submission. |
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
This change fixes the issue where the basic canary calculation would possibly round up the canary/stable counts and could exceed
maxSurge: 0
. The issue made it not possible to use rollouts for use cases where the replicas needed to be capped to a fixed size, such as a kafka consumer.As part of the change, we will now choose between stable/canary replica counts summing up to
spec.replicas
orspec.replicas + 1
depending on:Prior to this fix, we would end up always rounding up to
spec.replicas + 1
unless the desired weight was evenly divisible to 100.For a deeper understanding of the improvements, see the TestApproximateWeightedNewStableReplicaCounts table test for examples of the resulting calculations.
Resolves #1707
Here are some examples of differences between v1.1 vs. v1.2 behavior:
Signed-off-by: Jesse Suen [email protected]