File tree Expand file tree Collapse file tree 1 file changed +14
-7
lines changed Expand file tree Collapse file tree 1 file changed +14
-7
lines changed Original file line number Diff line number Diff line change @@ -315,13 +315,20 @@ def run_gke_node_pool_create_command(
315315 # Pathways needs CPU nodepools in addition to TPU nodepools
316316 for node_pool_name in desired_pw_cpu_node_pools :
317317 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+ 'gcloud container clusters resize'
321+ f' { args .cluster } --project={ args .project } --node-pool'
322+ f' { node_pool_name } --num-nodes=4'
323+ f' --region={ zone_to_region (args .zone )} --quiet'
324+ )
325+ else :
326+ command = (
327+ 'gcloud beta container node-pools create'
328+ 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'
329+ f' --machine-type={ args .pathways_gce_machine_type } --scopes=storage-full,gke-default,{ CLOUD_PLATFORM_AUTH_SCOPE_URL } --enable-autoscaling'
330+ ' --min-nodes=1 --max-nodes=20'
331+ )
325332 task = f'NodepoolCreate-{ node_pool_name } '
326333 create_commands .append (command )
327334 create_task_names .append (task )
You can’t perform that action at this time.
0 commit comments