Skip to content

Commit eadb7d8

Browse files
committed
Parameterizing the runners creation fields
1 parent 4537e41 commit eadb7d8

File tree

2 files changed

+15
-3
lines changed

2 files changed

+15
-3
lines changed

terraform-modules/aws/helm/github_runner/main.tf

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ resource "kubernetes_manifest" "runnerDeployment" {
140140
kind = "RunnerDeployment"
141141

142142
metadata = {
143-
name = "runnerdeploy"
143+
name = var.runner_deployment_name
144144
namespace = var.k8s_namespace
145145
}
146146

@@ -149,13 +149,13 @@ resource "kubernetes_manifest" "runnerDeployment" {
149149

150150
template ={
151151
spec = {
152-
repository = "ManagedKube/kubernetes-ops"
152+
repository = var.runner_repository_name
153153
env = []
154154

155155
# The labels on how to target this runner from the GHA's workflow files
156156
# Doc: https://github.com/actions-runner-controller/actions-runner-controller#runner-labels
157157
labels = [
158-
"custom-runner"
158+
var.runner_label
159159
]
160160
}
161161
}

terraform-modules/aws/helm/github_runner/variables.tf

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,3 +47,15 @@ variable "runner_repository_name" {
4747
description = "Runner config. The repository name to associate this runner to"
4848
default = null
4949
}
50+
51+
variable "runner_label" {
52+
type = string
53+
description = "Runner config. The label to place onto the runner and the label to use on the runs-on field in the GHA workflow file."
54+
default = "self-hosted"
55+
}
56+
57+
variable "runner_deployment_name" {
58+
type = string
59+
description = "Runner config. The runner CRD deployment name."
60+
default = "runnerdeploy"
61+
}

0 commit comments

Comments
 (0)