@@ -124,11 +124,6 @@ func (r *WorkloadDeploymentReconciler) Reconcile(ctx context.Context, req mcreco
124124
125125 result := r .reconcileNetworks (ctx , cl .GetClient (), & deployment )
126126 if result .ShouldReturn () {
127- if result .Err == nil {
128- // TODO(jreese) update instance status conditions to communicate what
129- // we're waiting on.
130- }
131-
132127 return result .Complete (ctx )
133128 }
134129
@@ -175,7 +170,7 @@ func (r *WorkloadDeploymentReconciler) Reconcile(ctx context.Context, req mcreco
175170 patchResult , err := controllerutil .CreateOrPatch (ctx , cl .GetClient (), & deployment , func () error {
176171 deployment .Status .Replicas = int32 (replicas )
177172 deployment .Status .CurrentReplicas = int32 (currentReplicas )
178- deployment .Status .DesiredReplicas = int32 ( desiredReplicas )
173+ deployment .Status .DesiredReplicas = desiredReplicas
179174
180175 if readyReplicas > 0 {
181176 apimeta .SetStatusCondition (& deployment .Status .Conditions , metav1.Condition {
@@ -184,7 +179,6 @@ func (r *WorkloadDeploymentReconciler) Reconcile(ctx context.Context, req mcreco
184179 Reason : "StableInstanceFound" ,
185180 Message : fmt .Sprintf ("%d/%d instances are ready" , readyReplicas , replicas ),
186181 })
187- } else {
188182 }
189183
190184 return nil
@@ -484,7 +478,7 @@ func enqueueWorkloadDeploymentByLocation(ctx context.Context, mgr mcmanager.Mana
484478 return nil
485479 }
486480
487- var requests []mcreconcile.Request
481+ requests := make ( []mcreconcile.Request , 0 , len ( workloadDeployments . Items ))
488482 for _ , workload := range workloadDeployments .Items {
489483 requests = append (requests , mcreconcile.Request {
490484 Request : reconcile.Request {
0 commit comments