Skip to content

Commit 39c8120

Browse files
authored
chore: Reduce nodes resources to 2 cores on our networks (#16763)
This PR reduces the standard spec for nodes/validators to 2 cores in our test environemnts.
2 parents 9c59a2e + 145e62e commit 39c8120

File tree

4 files changed

+82
-76
lines changed

4 files changed

+82
-76
lines changed

spartan/terraform/deploy-aztec-infra/values/prover-resources-prod.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,13 @@ node:
33
node:
44
resources:
55
requests:
6-
cpu: "3"
7-
memory: "12Gi"
6+
cpu: "1.6"
7+
memory: "5Gi"
88

99
nodeSelector:
1010
local-ssd: "false"
1111
node-type: "network"
12+
cores: "2"
1213

1314
affinity:
1415
podAntiAffinity:
@@ -40,6 +41,7 @@ broker:
4041
nodeSelector:
4142
local-ssd: "false"
4243
node-type: "network"
44+
cores: "2"
4345

4446
persistence:
4547
enabled: true

spartan/terraform/deploy-aztec-infra/values/rpc-resources-prod.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
nodeSelector:
22
local-ssd: "false"
33
node-type: "network"
4+
cores: "2"
45

56
affinity:
67
podAntiAffinity:
@@ -20,8 +21,8 @@ hostNetwork: true
2021
node:
2122
resources:
2223
requests:
23-
cpu: "3"
24-
memory: "12Gi"
24+
cpu: "1.6"
25+
memory: "5Gi"
2526
persistence:
2627
enabled: true
2728

spartan/terraform/deploy-aztec-infra/values/validator-resources-prod.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ validator:
33
nodeSelector:
44
local-ssd: "false"
55
node-type: "network"
6+
cores: "2"
67
affinity:
78
podAntiAffinity:
89
requiredDuringSchedulingIgnoredDuringExecution:
@@ -17,8 +18,8 @@ validator:
1718
node:
1819
resources:
1920
requests:
20-
cpu: "3"
21-
memory: "12Gi"
21+
cpu: "1.6"
22+
memory: "5Gi"
2223
statefulSet:
2324
volumeClaimTemplates:
2425
- metadata:

spartan/terraform/gke-cluster/cluster/main.tf

Lines changed: 72 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -41,44 +41,44 @@ resource "google_container_cluster" "primary" {
4141
}
4242

4343
# Create 2 core node pool with local ssd
44-
resource "google_container_node_pool" "aztec_nodes_2core_ssd" {
45-
name = "${var.cluster_name}-2core-ssd"
46-
location = var.zone
47-
cluster = var.cluster_name
48-
version = var.node_version
44+
# resource "google_container_node_pool" "aztec_nodes_2core_ssd" {
45+
# name = "${var.cluster_name}-2core-ssd"
46+
# location = var.zone
47+
# cluster = var.cluster_name
48+
# version = var.node_version
4949

50-
# Enable autoscaling
51-
autoscaling {
52-
min_node_count = 0
53-
max_node_count = 512
54-
}
50+
# # Enable autoscaling
51+
# autoscaling {
52+
# min_node_count = 0
53+
# max_node_count = 512
54+
# }
5555

56-
# Node configuration
57-
node_config {
58-
machine_type = "n2d-standard-2"
59-
ephemeral_storage_local_ssd_config {
60-
local_ssd_count = 1
61-
}
56+
# # Node configuration
57+
# node_config {
58+
# machine_type = "n2d-standard-2"
59+
# ephemeral_storage_local_ssd_config {
60+
# local_ssd_count = 1
61+
# }
6262

63-
service_account = var.service_account
64-
oauth_scopes = [
65-
"https://www.googleapis.com/auth/cloud-platform"
66-
]
63+
# service_account = var.service_account
64+
# oauth_scopes = [
65+
# "https://www.googleapis.com/auth/cloud-platform"
66+
# ]
6767

68-
labels = {
69-
env = "production"
70-
local-ssd = "true"
71-
node-type = "network"
68+
# labels = {
69+
# env = "production"
70+
# local-ssd = "true"
71+
# node-type = "network"
7272

73-
}
74-
tags = ["aztec-gke-node", "aztec"]
75-
}
73+
# }
74+
# tags = ["aztec-gke-node", "aztec"]
75+
# }
7676

77-
management {
78-
auto_repair = true
79-
auto_upgrade = false
80-
}
81-
}
77+
# management {
78+
# auto_repair = true
79+
# auto_upgrade = false
80+
# }
81+
# }
8282

8383
# Create 2 core node pool no ssd
8484
resource "google_container_node_pool" "aztec_nodes-2core" {
@@ -105,6 +105,7 @@ resource "google_container_node_pool" "aztec_nodes-2core" {
105105
env = "production"
106106
local-ssd = "false"
107107
node-type = "network"
108+
cores = "2"
108109
}
109110
tags = ["aztec-gke-node", "aztec"]
110111
}
@@ -141,6 +142,7 @@ resource "google_container_node_pool" "aztec_nodes-4core" {
141142
env = "production"
142143
local-ssd = "false"
143144
node-type = "network"
145+
cores = "4"
144146
}
145147
tags = ["aztec-gke-node", "aztec"]
146148
}
@@ -245,49 +247,49 @@ resource "google_container_node_pool" "spot_nodes_8core" {
245247
}
246248

247249
# Create 2 core spot instance node pool with autoscaling
248-
resource "google_container_node_pool" "spot_nodes_2core" {
249-
name = "${var.cluster_name}-2core-spot"
250-
location = var.zone
251-
cluster = var.cluster_name
252-
version = var.node_version
253-
# Enable autoscaling
254-
autoscaling {
255-
min_node_count = 0
256-
max_node_count = 1500
257-
}
250+
# resource "google_container_node_pool" "spot_nodes_2core" {
251+
# name = "${var.cluster_name}-2core-spot"
252+
# location = var.zone
253+
# cluster = var.cluster_name
254+
# version = var.node_version
255+
# # Enable autoscaling
256+
# autoscaling {
257+
# min_node_count = 0
258+
# max_node_count = 1500
259+
# }
258260

259-
# Node configuration
260-
node_config {
261-
machine_type = "t2d-standard-2"
262-
spot = true
261+
# # Node configuration
262+
# node_config {
263+
# machine_type = "t2d-standard-2"
264+
# spot = true
263265

264-
service_account = var.service_account
265-
oauth_scopes = [
266-
"https://www.googleapis.com/auth/cloud-platform"
267-
]
266+
# service_account = var.service_account
267+
# oauth_scopes = [
268+
# "https://www.googleapis.com/auth/cloud-platform"
269+
# ]
268270

269-
labels = {
270-
env = "production"
271-
pool = "spot"
272-
local-ssd = "false"
273-
node-type = "network"
274-
}
275-
tags = ["aztec-gke-node", "spot"]
271+
# labels = {
272+
# env = "production"
273+
# pool = "spot"
274+
# local-ssd = "false"
275+
# node-type = "network"
276+
# }
277+
# tags = ["aztec-gke-node", "spot"]
276278

277-
# Spot instance termination handler
278-
taint {
279-
key = "cloud.google.com/gke-spot"
280-
value = "true"
281-
effect = "NO_SCHEDULE"
282-
}
283-
}
279+
# # Spot instance termination handler
280+
# taint {
281+
# key = "cloud.google.com/gke-spot"
282+
# value = "true"
283+
# effect = "NO_SCHEDULE"
284+
# }
285+
# }
284286

285-
# Management configuration
286-
management {
287-
auto_repair = true
288-
auto_upgrade = false
289-
}
290-
}
287+
# # Management configuration
288+
# management {
289+
# auto_repair = true
290+
# auto_upgrade = false
291+
# }
292+
# }
291293

292294
# Create 8 core high memory (64 GB) node pool with autoscaling, used for metrics
293295
resource "google_container_node_pool" "infra_nodes_8core_highmem" {

0 commit comments

Comments
 (0)