Skip to content

Commit a4e7179

Browse files
authored
chore: set eth node resource profile (#23583)
Fix A-1104
1 parent 0be9204 commit a4e7179

4 files changed

Lines changed: 96 additions & 11 deletions

File tree

spartan/terraform/deploy-ethereum-nodes/main.tf

Lines changed: 24 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -49,13 +49,6 @@ locals {
4949
# we have to mark it as non-sensitive otherwise we can't run for_each on helm_releases :(
5050
jwt = nonsensitive(random_bytes.jwt.hex)
5151

52-
resources = {
53-
requests = {
54-
cpu = 2
55-
memory = "60Gi"
56-
}
57-
}
58-
5952
nodeSelector = {
6053
"node-type" = "infra"
6154
}
@@ -75,6 +68,18 @@ locals {
7568
repository = split(":", var.reth_image)[0]
7669
tag = split(":", var.reth_image)[1]
7770
}
71+
72+
resources = {
73+
requests = {
74+
cpu = var.reth_cpu_request
75+
memory = var.reth_memory_request
76+
}
77+
limits = {
78+
cpu = var.reth_cpu_limit
79+
memory = var.reth_memory_limit
80+
}
81+
}
82+
7883
p2pNodePort = {
7984
enabled = true
8085
port = var.reth_p2p_port
@@ -105,6 +110,18 @@ locals {
105110
repository = split(":", var.lighthouse_image)[0]
106111
tag = split(":", var.lighthouse_image)[1]
107112
}
113+
114+
resources = {
115+
requests = {
116+
cpu = var.lighthouse_cpu_request
117+
memory = var.lighthouse_memory_request
118+
}
119+
limits = {
120+
cpu = var.lighthouse_cpu_limit
121+
memory = var.lighthouse_memory_limit
122+
}
123+
}
124+
108125
checkpointSync = {
109126
enabled = true
110127
url = var.checkpoint_sync_url
Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,17 @@
11
namespace = "eth-mainnet"
22
chain = "mainnet"
33
checkpoint_sync_url = "https://mainnet.checkpoint.sigp.io"
4+
45
reth_p2p_port = 32100
56
reth_storage = "4Ti"
6-
lighthouse_p2p_port = 32101
7-
lighthouse_storage = "2Ti"
7+
reth_cpu_request = "1"
8+
reth_cpu_limit = "8"
9+
reth_memory_request = "64Gi"
10+
reth_memory_limit = "112Gi"
11+
12+
lighthouse_p2p_port = 32101
13+
lighthouse_storage = "2Ti"
14+
lighthouse_cpu_request = "1"
15+
lighthouse_cpu_limit = "8"
16+
lighthouse_memory_request = "24Gi"
17+
lighthouse_memory_limit = "48Gi"
Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,17 @@
11
namespace = "sepolia"
22
chain = "sepolia"
33
checkpoint_sync_url = "https://checkpoint-sync.sepolia.ethpandaops.io"
4+
45
reth_p2p_port = 32000
56
reth_storage = "2Ti"
6-
lighthouse_p2p_port = 32001
7-
lighthouse_storage = "2Ti"
7+
reth_cpu_request = "1"
8+
reth_cpu_limit = "4"
9+
reth_memory_request = "12Gi"
10+
reth_memory_limit = "24Gi"
11+
12+
lighthouse_p2p_port = 32001
13+
lighthouse_storage = "2Ti"
14+
lighthouse_cpu_request = "1"
15+
lighthouse_cpu_limit = "4"
16+
lighthouse_memory_request = "24Gi"
17+
lighthouse_memory_limit = "48Gi"

spartan/terraform/deploy-ethereum-nodes/variables.tf

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,30 @@ variable "reth_storage" {
6363
default = "4Ti"
6464
}
6565

66+
variable "reth_cpu_request" {
67+
description = "Reth CPU requests"
68+
type = string
69+
default = "2"
70+
}
71+
72+
variable "reth_cpu_limit" {
73+
description = "Reth CPU limit"
74+
type = string
75+
default = "4"
76+
}
77+
78+
variable "reth_memory_request" {
79+
description = "Reth RAM requests"
80+
type = string
81+
default = "16Gi"
82+
}
83+
84+
variable "reth_memory_limit" {
85+
description = "Reth RAM limit"
86+
type = string
87+
default = "32Gi"
88+
}
89+
6690
variable "lighthouse_image" {
6791
description = "Lighthouse Docker image"
6892
type = string
@@ -80,3 +104,27 @@ variable "lighthouse_storage" {
80104
type = string
81105
default = "1Ti"
82106
}
107+
108+
variable "lighthouse_cpu_request" {
109+
description = "Lighthouse CPU requests"
110+
type = string
111+
default = "2"
112+
}
113+
114+
variable "lighthouse_cpu_limit" {
115+
description = "Lighthouse CPU limit"
116+
type = string
117+
default = "4"
118+
}
119+
120+
variable "lighthouse_memory_request" {
121+
description = "Lighthouse RAM requests"
122+
type = string
123+
default = "16Gi"
124+
}
125+
126+
variable "lighthouse_memory_limit" {
127+
description = "Lighthouse RAM limit"
128+
type = string
129+
default = "32Gi"
130+
}

0 commit comments

Comments
 (0)