@@ -60,14 +60,6 @@ resource "google_project_iam_member" "k8s_infra_prow_viewers" {
6060 member = " group:[email protected] " 6161}
6262
63- // Allow prow-deployer service account in k8s-infra-prow-build-trusted to deploy
64- // to the cluster defined in here
65- resource "google_project_iam_member" "prow_deployer_for_prow_build" {
66- project = module. project . project_id
67- role = " roles/container.admin"
68- member = " serviceAccount:prow-deployer@k8s-infra-prow-build-trusted.iam.gserviceaccount.com"
69- }
70-
7163module "prow_build_cluster" {
7264 source = " ../modules/gke-cluster"
7365 project_name = module. project . project_id
@@ -86,18 +78,30 @@ module "prow_build_nodepool_c4_highmem_8_localssd" {
8678 cluster_name = module. prow_build_cluster . cluster . name
8779 location = module. prow_build_cluster . cluster . location
8880 node_locations = [
81+ " us-central1-a" ,
8982 " us-central1-b" ,
9083 " us-central1-c" ,
9184 " us-central1-f" ,
9285 ]
93- name = " pool6"
94- initial_count = 1
95- min_count = 1
96- max_count = 80
97- machine_type = " c4-highmem-8"
98- disk_size_gb = 500
99- disk_type = " hyperdisk-balanced"
100- service_account = module. prow_build_cluster . cluster_node_sa . email
86+ name = " pool6"
87+ initial_count = 1
88+ min_count = 1
89+ max_count = 250 # total across all zones
90+ machine_type = " c4-highmem-8-lssd"
91+ disk_size_gb = 100
92+ disk_type = " hyperdisk-balanced"
93+ enable_nested_virtualization = true
94+ service_account = module. prow_build_cluster . cluster_node_sa . email
95+ // This taint exists to bias workloads on to the C4D nodepool first, if we can't secure a C4D node
96+ // then we schedule on to a C4 node. C4D performs better than C4 but it is capacity constrained at times.
97+ // Also, nested virt doesn't work on C4D or C4A
98+ taints = [
99+ {
100+ key = " spare"
101+ value = " true"
102+ effect = " PREFER_NO_SCHEDULE"
103+ }
104+ ]
101105}
102106
103107module "prow_build_nodepool_c4d_highmem_8_localssd" {
@@ -113,53 +117,13 @@ module "prow_build_nodepool_c4d_highmem_8_localssd" {
113117 name = " pool7"
114118 initial_count = 1
115119 min_count = 10
116- max_count = 80
117- machine_type = " c4d-highmem-8-lssd" # has 2 local ssd disks attached
120+ max_count = 250 # total across all zones
121+ machine_type = " c4d-highmem-8-lssd" # has 1 local ssd disks attached
118122 disk_size_gb = 100
119123 disk_type = " hyperdisk-balanced"
120124 service_account = module. prow_build_cluster . cluster_node_sa . email
121125}
122126
123-
124- module "sig_node_node_pool_1_n4_highmem_8" {
125-
126- source = " github.com/GoogleCloudPlatform/cloud-foundation-fabric//modules/gke-nodepool?ref=v39.0.0&depth=1"
127- project_id = module. project . project_id
128- name = " sig-node-pool1"
129- location = module. prow_build_cluster . cluster . location
130- cluster_name = module. prow_build_cluster . cluster . name
131-
132- service_account = {
133- email = module.prow_build_cluster.cluster_node_sa.email
134- oauth_scopes = [" https://www.googleapis.com/auth/cloud-platform" ]
135- }
136-
137- nodepool_config = {
138- autoscaling = {
139- max_node_count = 10
140- min_node_count = 1 # 1 per zone
141- }
142- management = {
143- auto_repair = true
144- auto_upgrade = true
145- }
146- }
147-
148- node_config = {
149- machine_type = " n4-highmem-8"
150- disk_type = " hyperdisk-balanced"
151- image_type = " COS_CONTAINERD"
152- gvnic = true
153- workload_metadata_config_mode = " GKE_METADATA"
154- shielded_instance_config = {
155- enable_secure_boot = true
156- }
157- }
158-
159-
160- taints = { dedicated = { value = " sig-node" , effect = " NO_SCHEDULE" } }
161- }
162-
163127module "prow_build_nodepool_c4a_highmem_8_localssd" {
164128 source = " ../modules/gke-nodepool"
165129 project_name = module. project . project_id
@@ -169,11 +133,12 @@ module "prow_build_nodepool_c4a_highmem_8_localssd" {
169133 " us-central1-a" ,
170134 " us-central1-b" ,
171135 " us-central1-c" ,
136+ " us-central1-f" ,
172137 ]
173138 name = " pool7-arm64"
174139 initial_count = 1
175- min_count = 1
176- max_count = 10
140+ min_count = 3
141+ max_count = 100 # total across all zones
177142 machine_type = " c4a-highmem-8-lssd" # has 2 local ssd disks attached
178143 disk_size_gb = 100
179144 disk_type = " hyperdisk-balanced"
0 commit comments