Replies: 2 comments 4 replies
-
Hi @lesaux ! I will try to answer each concern in turn. Apologies for the wall of text.
The only endpoint that (currently) needs to be reachable by github is the garm-cli controller show This endpoint is used by GitHub to send workflow webhooks to GARM, so we know when a new job has started, and that we need to schedule a new ephemeral runner.
The metadata and callback URLs can be changed independently from the webhook URL. You can do so using: garm-cli controller update --callback-url https://callback.example.com --metadata-url https://metadata.example.com There is an explanation of these URLs in the using garm document.
When you add a new repo, org or entrprise, you have the option to install a webhook (or add it manually). The action of adding a webhook also requires a secret. That secret is used to validate all requests that come into the The callback and metadata URLs are protected by short lived JWT tokens generated for the instances which will host the github runner. The tokens are valid for 1 hour. Once the instance calls back home with a success or failure status, the token gets invalidated immediately. So, the token is good for at most 1 hour. And it only grants access to that specific runner's information. The only endpoint that needs to be accessible by the outside world, is the
You can chose to limit access to the You can find more details here: https://github.com/cloudbase/garm/blob/main/doc/using_garm.md#controller-operations
GitHubs actions-runner-controllers uses scale sets. This is a feature that uses longpoll to wait for jobs from github. However, the APIs to enable this are undocumented (for now). I've started working on adding scale sets to GARM, but it is still a work in progress. Future versions of GARM will hopefully have scale sets as well, in which case, the And hopefully, GitHub will document the scale sets APIs (they've been around for more than a year) so we can have somewhat of a guarantee of their stability. |
Beta Was this translation helpful? Give feedback.
-
Thank you so much for the very detailed explanation. I will proceed with the setup you describe above, exposing the /webhooks path via a public ingress, and the remainder of the paths on an internal load balancer accessible by my GCE VMs. With so many public Github actions workflows being shared as containers, arc-DinD mode not performing so well, arc-k8s mode being a bit mysterious, and me not wanting to rewrite all of our current workflows, GARM seems to be the better way! |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
My scenario is the following, I would like to run garm in a stateful set in GKE, and then use the gce_provider for a pool of runners on GCE vms.
When using a github application to authenticate, Are garm public endpoints reachable by github.com still needed? (i.e. The base webhook and the controller webhook URLs) - It seems no endpoints are required in actions-runner-controller for example.
If they are, Is it possible to have different urls for Metadata URL and Callback URL? it feels like these endpoint could be private internal endpoints.
In general, how do you secure these garm public endpoint? Do you use github whitelist ips?
Beta Was this translation helpful? Give feedback.
All reactions