Skip to content

ephemeralrunner should support a TTL #4100

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
srob-ntap opened this issue May 23, 2025 · 1 comment
Open

ephemeralrunner should support a TTL #4100

srob-ntap opened this issue May 23, 2025 · 1 comment
Labels
community Community contribution enhancement New feature or request needs triage Requires review from the maintainers

Comments

@srob-ntap
Copy link

srob-ntap commented May 23, 2025

What would you like added?

It would be nice if the ephemeral runners supported a TimeToLive value to cleanly expire the pod & ephemeral runners.

Why is this needed?

I have an ephemeralrunner setup defined via gha-runner-scale-set. I have minRunners set, and when the runners startup they connect to GHE and wait for work. Part of my pod spec includes a custom volume that I need to "keep fresh" by rotating every 2 hours. (The volume is time consuming to setup, and our volume provisioner abstracts that time). We installed a liveness probe on the pod to expire after 2 hours, and this works up to a max of 5 times due to this code:

if len(ephemeralRunner.Status.Failures) > maxFailures {
log.Info(fmt.Sprintf("EphemeralRunner has failed more than %d times. Deleting ephemeral runner so it can be re-created", maxFailures))
if err := r.Delete(ctx, ephemeralRunner); err != nil {
log.Error(fmt.Errorf("failed to delete ephemeral runner after %d failures: %w", maxFailures, err), "Failed to delete ephemeral runner")
return ctrl.Result{}, err
}
return ctrl.Result{}, nil
}

After hitting that condition, the ephemeralrunner resource hangs around with no new pod and eventually (after ~10 hours of idle time) all ephemeralrunners have no running pods (meaning we lose all our GH Runners).

@srob-ntap srob-ntap added enhancement New feature or request needs triage Requires review from the maintainers community Community contribution labels May 23, 2025
Copy link
Contributor

Hello! Thank you for filing an issue.

The maintainers will triage your issue shortly.

In the meantime, please take a look at the troubleshooting guide for bug reports.

If this is a feature request, please review our contribution guidelines.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community Community contribution enhancement New feature or request needs triage Requires review from the maintainers
Projects
None yet
Development

No branches or pull requests

1 participant