You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
| ROUTE_WEBHOOK | /webhook | The Cloud Run path that is invoked by the GitHub webhook. Depending on the workflow job, a Cloud Task "delete runner" or "create runner" is enqueued. |
32
-
| ROUTE_DELETE_VM | /delete_vm | The Cloud Run callback path invoked by Cloud Task when a VM instance should be **deleted**. The payload contains the name of the "to be deleted" VM instance. |
33
-
| ROUTE_CREATE_VM | /create_vm | The Cloud Run callback path invoked by Cloud Task when a VM instance should be **created**. The payload contains the name of the "to be created" VM instance. |
34
-
| WEBHOOK_SECRET || The GitHub webhook secret. This is the secret the webhook has been [configured](https://docs.github.com/en/webhooks/using-webhooks/validating-webhook-deliveries) with. |
35
-
| PROJECT_ID || The Google Cloud Project Id. |
36
-
| ZONE || The Google Cloud zone where the VM instance will be created. |
37
-
| TASK_QUEUE || The relative resource name of the Cloud Task queue. |
38
-
| INSTANCE_TEMPLATE || The relative resource name of the instance template from which the VM instance will be created. |
39
-
| SECRET_VERSION || The relative resource name of the secret version which contains the PAT |
40
-
| RUNNER_PREFIX | runner | Prefix for the the name of a new VM instance. A random string (10 random lower case characters) will be added to make the name unique: "<prefix>-<random_string>". |
41
-
| RUNNER_GROUP | Default | The GitHub runner group where the VM instance is expected to join as a self hosted runner. |
42
-
| RUNNER_LABELS | self-hosted *(comma separated list)*| Only workflow jobs whose labels match **all** the configured labels will be taken into account. If only one configured label is **not** found in the workflow job it will be ignored. |
43
-
| GITHUB_ORG || The name of the GitHub Organization |
44
-
| PORT | 8080 | To which port the webserver is bound. |
| ROUTE_WEBHOOK | /webhook | The Cloud Run path that is invoked by the GitHub webhook. Depending on the workflow job, a Cloud Task "delete runner" or "create runner" is enqueued. |
32
+
| ROUTE_DELETE_VM | /delete_vm | The Cloud Run callback path invoked by Cloud Task when a VM instance should be **deleted**. The payload contains the name of the "to be deleted" VM instance. |
33
+
| ROUTE_CREATE_VM | /create_vm | The Cloud Run callback path invoked by Cloud Task when a VM instance should be **created**. The payload contains the name of the "to be created" VM instance. |
34
+
| WEBHOOK_SECRET || The GitHub webhook secret. This is the secret the webhook has been [configured](https://docs.github.com/en/webhooks/using-webhooks/validating-webhook-deliveries) with. |
35
+
| PROJECT_ID || The Google Cloud Project Id. |
36
+
| ZONE || The Google Cloud zone where the VM instance will be created. |
37
+
| TASK_QUEUE || The relative resource name of the Cloud Task queue. |
38
+
| INSTANCE_TEMPLATE || The relative resource name of the instance template from which the VM instance will be created. |
39
+
| SECRET_VERSION || The relative resource name of the secret version which contains the PAT |
40
+
| RUNNER_PREFIX | runner | Prefix for the the name of a new VM instance. A random string (10 random lower case characters) will be added to make the name unique: "<prefix>-<random_string>". |
41
+
| RUNNER_GROUP_NAME | Default | The GitHub runner group name where the VM instance is expected to join as a self hosted runner. |
42
+
| RUNNER_GROUP_ID | 0 | (optional - but preferred) The GitHub runner group ID where the VM instance is expected to join as a self hosted runner (must be the ID of the **same** runner group with the name RUNNER_GROUP_NAME). |
43
+
| RUNNER_LABELS | self-hosted *(comma separated list)*| Only workflow jobs whose labels match **all** the configured labels will be taken into account. If only one configured label is **not** found in the workflow job it will be ignored. |
44
+
| GITHUB_ORG || The name of the GitHub Organization |
45
+
| PORT | 8080 | To which port the webserver is bound. |
46
+
47
+
> [!IMPORTANT]
48
+
> If RUNNER_GROUP_ID is set to a value **greater than 0** the VM instance will use a **jit config** to register itself as a GitHub runner. Else the VM instance will use a registration token to register itself as a GitHub runner.
@@ -473,7 +571,7 @@ func (s *Autoscaler) handleWebhook(ctx *gin.Context) {
473
571
log.Warnf("Webhook signaled to delete a runner that is missing the label(s) \"%s\" - ignoring", strings.Join(missingLabels, ", "))
474
572
}
475
573
} else {
476
-
log.Warnf("Webhook signaled to delete a runner that does not belong to the expected runner group (expected \"%s\" got \"%s\") - ignoring", s.conf.RunnerGroup, payload.Job.RunnerGroupName)
574
+
log.Warnf("Webhook signaled to delete a runner that does not belong to the expected runner group (expected \"%s\" got \"%s\") - ignoring", s.conf.RunnerGroupName, payload.Job.RunnerGroupName)
477
575
}
478
576
}
479
577
ctx.Status(http.StatusOK)
@@ -496,7 +594,8 @@ type AutoscalerConfig struct {
description="The name of the GitHub organization the runner will join"
40
40
}
41
41
42
-
variable"github_runner_group" {
42
+
variable"github_runner_group_name" {
43
43
type=string
44
44
description="The name of the GitHub runner group the runner will join"
45
45
default="Default"
46
46
}
47
47
48
+
variable"github_runner_group_id" {
49
+
type=number
50
+
description="The ID of the GitHub runner group the runner will join (must be the same group with name var.github_runner_group_name). If this value is greater 0 then a jit config is used for runner registration. Otherwise a registration token is used!"
51
+
default=0
52
+
}
53
+
48
54
variable"github_runner_labels" {
49
55
type=list(string)
50
56
description="One or multiple labels the runner will be tagged with"
0 commit comments