* Ensure the pool loop exits properly when the pool is not yet in
a running state.
* Use ListInstances() when cleaning orphaned runners. This ensures
We only run one API call per pool to list instances, instead of running
a GetInstance() for each individual instance we are checking.
Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
Define a metadata subrouter and move the token endpoint there. We may
end up needing multiple endpoints for various purposes in the future.
Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
This change adds a github registration endpoint that instances can use
to fetch a github registration token.
This change also invalidates disables access to an instance to the token
and status updates endpoints once the instance transitions from
"pending" or "installing" to any other state.
* The `{{ .RunnerUsername }}` is not replaced in any external providers' scripts.
However, we can safely assume that the username is properly created by
cloud-init before the userdata is executed.
* Correctly use the `OS_TO_GH_ARCH_MAP` bash map.
Signed-off-by: Ionut Balutoiu <ibalutoiu@cloudbasesolutions.com>