File tree Expand file tree Collapse file tree 1 file changed +11
-7
lines changed Expand file tree Collapse file tree 1 file changed +11
-7
lines changed Original file line number Diff line number Diff line change @@ -315,13 +315,17 @@ def run_gke_node_pool_create_command(
315
315
# Pathways needs CPU nodepools in addition to TPU nodepools
316
316
for node_pool_name in desired_pw_cpu_node_pools :
317
317
if node_pool_name in existing_node_pool_names :
318
- continue
319
- command = (
320
- 'gcloud beta container node-pools create'
321
- f' { node_pool_name } --node-version={ gke_node_pool_version } --cluster={ args .cluster } --project={ args .project } --node-locations={ args .zone } --region={ zone_to_region (args .zone )} --num-nodes=1'
322
- f' --machine-type={ args .pathways_gce_machine_type } --scopes=storage-full,gke-default,{ CLOUD_PLATFORM_AUTH_SCOPE_URL } --enable-autoscaling'
323
- ' --min-nodes=1 --max-nodes=20'
324
- )
318
+ # Resize Pathways CPU nodepool to have at least 4 nodes
319
+ command = (
320
+ f'gcloud container clusters resize { args .cluster } --project={ args .project } --node-pool { node_pool_name } --num-nodes=4 --region={ zone_to_region (args .zone )} --quiet'
321
+ )
322
+ else :
323
+ command = (
324
+ 'gcloud beta container node-pools create'
325
+ f' { node_pool_name } --node-version={ gke_node_pool_version } --cluster={ args .cluster } --project={ args .project } --node-locations={ args .zone } --region={ zone_to_region (args .zone )} --num-nodes=4'
326
+ f' --machine-type={ args .pathways_gce_machine_type } --scopes=storage-full,gke-default,{ CLOUD_PLATFORM_AUTH_SCOPE_URL } --enable-autoscaling'
327
+ ' --min-nodes=1 --max-nodes=20'
328
+ )
325
329
task = f'NodepoolCreate-{ node_pool_name } '
326
330
create_commands .append (command )
327
331
create_task_names .append (task )
You can’t perform that action at this time.
0 commit comments