actions / actions/actions-runner-controller

ephemeralrunner should support a TTL

Open
#4,100 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

community enhancement needs triage
Dominant language
Go
Stars
6.5k
Forks
1.5k
Avg merge
2d 2h
Merged PRs (30d)
27

Description

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:

https://github.com/actions/actions-runner-controller/blob/1dbb88cb9ee8fcfc4c28406e5d0b910d8a4419cc/controllers/actions.github.com/ephemeralrunner_controller.go#L190-L198

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).

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in controllers/actions.github.com/ephemeralrunner_controller.go around lines 190-198, then trace how EphemeralRunner resources and pods are created and cleaned up. Define how a TimeToLive value should expire both the pod and ephemeral runner without exhausting the existing retry condition; done means the resource is replaced or removed cleanly after the TTL and runners remain available.

Written by the indexing model from the issue text.

Assessment

Tech stack
github-actions, go, kubernetes
Domain
ci-cd, devops, infrastructure
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.