Skip to content

Commit 72749a2

Browse files
authored
Some terraform changes to make arc updates work (#37985)
1 parent 030460c commit 72749a2

File tree

3 files changed

+20
-7
lines changed

3 files changed

+20
-7
lines changed

.github/gh-actions-self-hosted-runners/arc/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ main_runner = {
4545
max_node_count = "5" # Main runner pool maximal node count
4646
min_replicas = "5" # Min number of runner PODs in the main pool . Do not confuse with Nodes
4747
max_replicas = "20" # Max number of runner PODs in the main pool . Do not confuse with Nodes
48-
webhook_scaling # Enable webhook scaling for main pool
48+
webhook_scaling = true # Enable webhook scaling for main pool
4949
}
5050
environment = "environment_name" # Name of the environment. Used as a prefix like dev- stag- anything-
5151
ingress_domain = "fqdn" # FQDN for webhook ingress
@@ -66,7 +66,7 @@ machine_type = "e2-standard-2" # Macihne type for the pool
6666
min_node_count = 1 # Minimal node count
6767
max_node_count = 2 # Maximal node count
6868
min_replicas = 1 # Minimal replica count
69-
min_replicas = 2 # Maximal replica count
69+
max_replicas = 2 # Maximal replica count
7070
webhook_scaling = true # Enable webhook based scaling
7171
runner_image = "gcr.io/someimage:sometag" # Image to use
7272
labels = ["self-hosted", "testrunner"] # Label set for runner pool. Used in `on`

.github/gh-actions-self-hosted-runners/arc/gke.tf

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,15 @@ resource "google_container_node_pool" "main-actions-runner-pool" {
4747
]
4848
service_account = data.google_service_account.service_account.email
4949
tags = ["actions-runner-pool"]
50+
labels = {
51+
"runner-pool" = var.main_runner.name
52+
}
5053
}
54+
lifecycle {
55+
ignore_changes = [
56+
node_config[0].resource_labels,
57+
]
58+
}
5159
}
5260

5361
resource "google_container_node_pool" "additional_runner_pools" {
@@ -88,7 +96,12 @@ resource "google_container_node_pool" "additional_runner_pools" {
8896
}
8997
}
9098
}
99+
lifecycle {
100+
ignore_changes = [
101+
node_config[0].resource_labels,
102+
]
91103
}
104+
}
92105

93106

94107
resource "google_compute_global_address" "actions-runner-ip" {

.github/gh-actions-self-hosted-runners/arc/helm.tf

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ resource "helm_release" "cert-manager" {
2323
repository = "https://charts.jetstack.io"
2424
chart = "cert-manager"
2525

26-
atomic = "true"
27-
timeout = 100
26+
atomic = true
27+
timeout = 600
2828

2929
set = [
3030
{
@@ -38,12 +38,12 @@ resource "helm_release" "cert-manager" {
3838
resource "helm_release" "arc" {
3939
name = "arc"
4040
namespace = "arc"
41-
create_namespace = "true"
41+
create_namespace = true
4242
repository = "https://actions-runner-controller.github.io/actions-runner-controller"
4343
chart = "actions-runner-controller"
4444

45-
atomic = "true"
46-
timeout = 120
45+
atomic = true
46+
timeout = 600
4747

4848
set = [
4949
for k, v in local.arc_values : {

0 commit comments

Comments
 (0)