-
Notifications
You must be signed in to change notification settings - Fork 850
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: abort scaledown stable RS for canary with traffic routing #1331
fix: abort scaledown stable RS for canary with traffic routing #1331
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1331 +/- ##
==========================================
- Coverage 81.40% 81.27% -0.14%
==========================================
Files 106 107 +1
Lines 9778 9824 +46
==========================================
+ Hits 7960 7984 +24
- Misses 1278 1297 +19
- Partials 540 543 +3
Continue to review full report at Codecov.
|
572490f
to
6b53549
Compare
- Don't set desiredNewReplica to 0 if rollout is aborted Signed-off-by: Hui Kang <hui.kang@salesforce.com>
6b53549
to
aff0e67
Compare
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.
@huikang I think we should be fixing this in a different way.
Instead of modifying CalculateReplicaCountsForCanary
to consider if we see ro.Status.Abort
, I think it will be cleaner to modify GetCanaryReplicasOrWeight
so that it always returns 100 if we are in a fully promoted state.
Something like:
// GetCanaryReplicasOrWeight either returns a static set of replicas or a weight percentage
func GetCanaryReplicasOrWeight(rollout *v1alpha1.Rollout) (*int32, int32) {
if rollout.Status.PromoteFull || rollout.Status.CurrentPodHash == rollout.Status.StableRS {
return nil, 100
}
WDYT?
…rollout.Status.StableRS co-authored-by: Jesse Suen <jesse_suen@intuit.com> Signed-off-by: Hui Kang <hui.kang@salesforce.com>
Hi, @jessesuen , your approach is more generic than my last one. PR is updated. Thanks for your feedback. |
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
Signed-off-by: Hui Kang hui.kang@salesforce.com
close #1292
Checklist:
"fix(controller): Updates such and such. Fixes #1234"
.