actions / actions/actions-runner-controller
ephemeralrunner should support a TTL
Nobody has claimed this yet.
- 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:
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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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