actions / actions-runner-controller

Kubernetes controller for GitHub Actions self-hosted runners
Apache License 2.0
4.42k stars 1.04k forks source link

Enable node affinity for listener pods and runner pods #3355

Closed sjm-ho closed 3 months ago

sjm-ho commented 3 months ago

What would you like added?

I was following this quickstart guide https://docs.github.com/en/actions/hosting-your-own-runners/managing-self-hosted-runners-with-actions-runner-controller/quickstart-for-actions-runner-controller and I would like node affinity support to be added for listener and runner jobs as well.

Why is this needed?

This would be needed for usecases like when we would need to deploy everything related to github actions arc controller even the runner pods on a specific node group thus segregating the workload types

github-actions[bot] commented 3 months ago

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.

nikola-jokic commented 3 months ago

Hey @sjm-ho,

This Enhancement is related to gha-runner-scale-set, and not the community version. To answer this request, you already have the ability to customize both the listener pod, and the ephemeral runner pods. For container jobs, if you are using container mode kubernetes, you can use the hook extension.

sjm-ho commented 3 months ago

Hey @nikola-jokic I could achieve the same by

for controller pod

Screenshot 2024-03-15 at 9 12 55 PM

for listener pod

Screenshot 2024-03-15 at 9 09 14 PM

for runner pod

Screenshot 2024-03-15 at 9 09 21 PM

I actually added the affinity parameters in a custom values.yaml and passed it while installing helm chart. Do let me know each of these 3 methods I used are accurate.

Although I couldn't understand what is container jobs in kubernetes mode though. Could you point me to the correct documentation for me to go through?