Skip to content

Commit

Permalink
Fix completed runner pod recreation not to be blocked after max out
Browse files Browse the repository at this point in the history
  • Loading branch information
mumoshu committed Jun 27, 2022
1 parent e2c8163 commit 906f2b9
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion controllers/runnerdeployment_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,10 @@ func (r *RunnerDeploymentReconciler) Reconcile(ctx context.Context, req ctrl.Req
newDesiredReplicas := getIntOrDefault(desiredRS.Spec.Replicas, defaultReplicas)

// Please add more conditions that we can in-place update the newest runnerreplicaset without disruption
if currentDesiredReplicas != newDesiredReplicas {
//
// If we missed taking the EffectiveTime diff into account, you might end up experiencing scale-ups being delayed scale-down.
// See https://github.com/actions-runner-controller/actions-runner-controller/pull/1477#issuecomment-1164154496
if currentDesiredReplicas != newDesiredReplicas || newestSet.Spec.EffectiveTime != rd.Spec.EffectiveTime {
newestSet.Spec.Replicas = &newDesiredReplicas
newestSet.Spec.EffectiveTime = rd.Spec.EffectiveTime

Expand Down

0 comments on commit 906f2b9

Please sign in to comment.