-
Notifications
You must be signed in to change notification settings - Fork 867
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
feat: automatically scale down Deployment after migrating to Rollout #3111
feat: automatically scale down Deployment after migrating to Rollout #3111
Conversation
cdfc6c2
to
de33aee
Compare
b283ca7
to
f5b4bbf
Compare
fixes #2748 |
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #3111 +/- ##
==========================================
+ Coverage 81.80% 81.81% +0.01%
==========================================
Files 134 135 +1
Lines 20576 20621 +45
==========================================
+ Hits 16832 16871 +39
- Misses 2875 2880 +5
- Partials 869 870 +1 ☔ View full report in Codecov by Sentry. |
54356c3
to
fe96101
Compare
Any updates? |
84d42a5
to
24d5cc2
Compare
rollout/sync.go
Outdated
@@ -378,6 +378,12 @@ func (c *rolloutContext) scaleReplicaSet(rs *appsv1.ReplicaSet, newScale int32, | |||
revision, _ := replicasetutil.Revision(rs) | |||
c.recorder.Eventf(rollout, record.EventOptions{EventReason: conditions.ScalingReplicaSetReason}, conditions.ScalingReplicaSetMessage, scalingOperation, rs.Name, revision, oldScale, newScale) | |||
c.replicaSetInformer.GetIndexer().Update(rs) | |||
if rollout.Spec.WorkloadRef != nil && rollout.Spec.WorkloadRef.ScaleDown == v1alpha1.ScaleDownProgressively { |
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.
I realized that for the ScaleDownProgressively
option the deployment will be scaled down without waiting for the rollout replicas to become available.
Do you have any suggestions where we can test that? We should scale down the deployment only after the replicas become available.
cc: @carlossg
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.
I changed the logic for the progressively
scaleDown option, now the deployment is scaled down as the rollout is scaled up and its replicas become ready.
6e06f5e
to
cb1824b
Compare
Is this ready for a second review now? |
@zachaller , yes it is ready |
Signed-off-by: balasoiu <[email protected]>
cb1824b
to
b87e97e
Compare
@balasoiuroxana looks good and ready to merge, can you fix the last small conflict? |
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
…rgoproj#3111) Automatically scale down Deployment after migrating to Rollout Signed-off-by: balasoiu <[email protected]> Co-authored-by: balasoiu <[email protected]> Signed-off-by: ashutosh16 <[email protected]>
@balasoiuroxana @zachaller Thanks for this awesome feature but I don't see it in the latest argo rollout version v1.6.4. when it's expected to be rolled out? |
It will be available in 1.7 we don't have a set date on that yet, I want to try and get step plugins in 1.7 |
Hello, is there any information about the release date of v1.7? |
Couldn't you also do this the other way as well. On deletion of the rollout the reconciler takes the current replicas of the rollout and applies it to the referenced deployment (if available). Once the pods become healthy, delete the rollout's child replica-sets and remove the finalizer? |
fixes: #2748
Checklist:
"fix(controller): Updates such and such. Fixes #1234"
.