Skip to content

Commit a2b5b17

Browse files
authored
upgrade arm64 gke nodepool (#8147)
* upgrade arm64 gke nodepool * set initial count to 0 * ignore readonly field
1 parent 4bf9a42 commit a2b5b17

File tree

2 files changed

+28
-7
lines changed
  • infra/gcp/terraform

2 files changed

+28
-7
lines changed

infra/gcp/terraform/k8s-infra-prow-build/main.tf

Lines changed: 27 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ module "prow_build_nodepool_n1_highmem_8_localssd" {
9494
"us-central1-f",
9595
]
9696
name = "pool5"
97-
initial_count = 1
97+
initial_count = 0
9898
min_count = 0
9999
max_count = 0
100100
image_type = "UBUNTU_CONTAINERD"
@@ -125,6 +125,26 @@ module "prow_build_nodepool_c4_highmem_8_localssd" {
125125
service_account = module.prow_build_cluster.cluster_node_sa.email
126126
}
127127

128+
module "prow_build_nodepool_c4d_highmem_8_localssd" {
129+
source = "../modules/gke-nodepool"
130+
project_name = module.project.project_id
131+
cluster_name = module.prow_build_cluster.cluster.name
132+
location = module.prow_build_cluster.cluster.location
133+
node_locations = [
134+
"us-central1-a",
135+
"us-central1-b",
136+
"us-central1-c",
137+
]
138+
name = "pool7"
139+
initial_count = 1
140+
min_count = 1
141+
max_count = 80
142+
machine_type = "c4d-highmem-8-lssd" # has 2 local ssd disks attached
143+
disk_size_gb = 100
144+
disk_type = "hyperdisk-balanced"
145+
service_account = module.prow_build_cluster.cluster_node_sa.email
146+
}
147+
128148

129149
module "sig_node_node_pool_1_n4_highmem_8" {
130150

@@ -165,25 +185,25 @@ module "sig_node_node_pool_1_n4_highmem_8" {
165185
taints = { dedicated = { value = "sig-node", effect = "NO_SCHEDULE" } }
166186
}
167187

168-
module "prow_build_nodepool_t2a_standard_8" {
188+
module "prow_build_nodepool_c4a_highmem_8_localssd" {
169189
source = "../modules/gke-nodepool"
170190
project_name = module.project.project_id
171191
cluster_name = module.prow_build_cluster.cluster.name
172192
location = module.prow_build_cluster.cluster.location
173193
node_locations = [
174194
"us-central1-a",
175195
"us-central1-b",
196+
"us-central1-c",
176197
]
177-
name = "pool6-arm64"
198+
name = "pool7-arm64"
178199
initial_count = 1
179200
min_count = 1
180201
max_count = 10
181202
image_type = "UBUNTU_CONTAINERD"
182-
machine_type = "t2a-standard-8"
183-
disk_size_gb = 500
184-
disk_type = "pd-ssd"
203+
machine_type = "c4a-highmem-8-lssd" # has 2 local ssd disks attached
204+
disk_size_gb = 100
205+
disk_type = "hyperdisk-balanced"
185206
// GKE automatically taints arm64 nodes
186207
// https://cloud.google.com/kubernetes-engine/docs/how-to/prepare-arm-workloads-for-deployment#overview
187-
# ephemeral_local_ssd_count = 2 # each is 375GB
188208
service_account = module.prow_build_cluster.cluster_node_sa.email
189209
}

infra/gcp/terraform/modules/gke-nodepool/main.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ resource "google_container_node_pool" "node_pool" {
8181
# https://www.terraform.io/docs/providers/google/r/container_cluster.html#taint
8282
ignore_changes = [
8383
node_config[0].taint,
84+
node_config[0].ephemeral_storage_local_ssd_config, # https://github.com/hashicorp/terraform-provider-google/issues/17068
8485
]
8586
}
8687
}

0 commit comments

Comments
 (0)