Re-use the last desired patch on empty batch (#3453)

This commit is contained in:
Nikola Jokic
2024-05-17 15:12:16 +02:00
committed by GitHub
parent fa7a4f584e
commit ab92e4edc3
3 changed files with 376 additions and 38 deletions

View File

@@ -213,9 +213,6 @@ func (r *EphemeralRunnerSetReconciler) Reconcile(ctx context.Context, req ctrl.R
// on the next batch
case ephemeralRunnerSet.Spec.PatchID == 0 && total > ephemeralRunnerSet.Spec.Replicas:
count := total - ephemeralRunnerSet.Spec.Replicas
if count <= 0 {
break
}
log.Info("Deleting ephemeral runners (scale down)", "count", count)
if err := r.deleteIdleEphemeralRunners(
ctx,