@@ -59,8 +59,8 @@ func (r *QWorkerReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ct
59
59
return ctrl.Result {}, err
60
60
}
61
61
currentPodCount := len (podList .Items )
62
- qworker .Status .CurrentReplicas = currentPodCount
63
62
63
+ qworker .Status .CurrentReplicas = currentPodCount
64
64
if err := r .Status ().Update (ctx , qworker ); err != nil {
65
65
log .Log .Error (err , fmt .Sprintf ("Failed to update QWorker status %s" , qworker .Name ))
66
66
return ctrl.Result {}, err
@@ -83,8 +83,10 @@ func (r *QWorkerReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ct
83
83
desiredPodsAmount := min (
84
84
max (QueueLength * qworker .Spec .ScaleConfig .ScalingFactor , qworker .Spec .ScaleConfig .MinReplicas ),
85
85
qworker .Spec .ScaleConfig .MaxReplicas )
86
- log . Log . Info ( fmt . Sprintf ( "desired amount: %d" , desiredPodsAmount ))
86
+
87
87
qworker .Status .DesiredReplicas = desiredPodsAmount
88
+ log .Log .Info (fmt .Sprintf ("desired amount: %d" , qworker .Status .DesiredReplicas ))
89
+ log .Log .Info (fmt .Sprintf ("current amount: %d" , qworker .Status .CurrentReplicas ))
88
90
89
91
diffAmount := qworker .Status .DesiredReplicas - qworker .Status .CurrentReplicas
90
92
log .Log .Info (fmt .Sprintf ("going to deploy / takedown: %d pods" , diffAmount ))
0 commit comments