mirror of
https://github.com/actions/actions-runner-controller.git
synced 2025-12-11 12:06:57 +00:00
Make RunnerSet much more reliable with or without webhook
This commit is contained in:
@@ -356,6 +356,13 @@ func (r *RunnerPodReconciler) Reconcile(ctx context.Context, req ctrl.Request) (
|
||||
return *res, err
|
||||
}
|
||||
|
||||
if runnerPodOrContainerIsStopped(updated) {
|
||||
log.Info("Detected runner to have successfully stopped", "name", runnerPod.Name)
|
||||
return ctrl.Result{}, nil
|
||||
} else {
|
||||
log.Info("Runner can be safely deleted", "name", runnerPod.Name)
|
||||
}
|
||||
|
||||
// Delete current pod if recreation is needed
|
||||
if err := r.Delete(ctx, updated); err != nil {
|
||||
log.Error(err, "Failed to delete pod resource")
|
||||
|
||||
Reference in New Issue
Block a user