File tree Expand file tree Collapse file tree 6 files changed +116
-4
lines changed
Expand file tree Collapse file tree 6 files changed +116
-4
lines changed Original file line number Diff line number Diff line change @@ -124,6 +124,11 @@ jobs:
124124 BOT_SWAPS_FOLLOW_CHAIN=PENDING
125125 BOT_SWAPS_TX_INTERVAL_SECONDS=350
126126
127+ RPC_INGRESS_ENABLED=true
128+ RPC_INGRESS_HOST=staging.alpha-testnet.aztec-labs.com
129+ RPC_INGRESS_STATIC_IP_NAME=staging-rc-1-ingress
130+ RPC_INGRESS_SSL_CERT_NAME=staging-public-rpc-cert
131+
127132 FLUSH_ENTRY_QUEUE=false
128133 EOF
129134 echo "NAMESPACE=$NAMESPACE" >> $GITHUB_ENV
@@ -236,6 +241,12 @@ jobs:
236241 BOT_TRANSFERS_REPLICAS=0
237242 BOT_SWAPS_REPLICAS=0
238243 FLUSH_ENTRY_QUEUE=false
244+
245+ # RPC_INGRESS_ENABLED=true
246+ # RPC_INGRESS_HOST=rpc.testnet.aztec-labs.com
247+ # RPC_INGRESS_STATIC_IP_NAME=testnet-rpc-ingress
248+ # RPC_INGRESS_SSL_CERT_NAME=testnet-rpc-cert
249+
239250 EOF
240251 echo "NAMESPACE=$NAMESPACE" >> $GITHUB_ENV
241252
Original file line number Diff line number Diff line change @@ -75,6 +75,11 @@ BOT_SWAPS_TX_INTERVAL_SECONDS=${BOT_SWAPS_TX_INTERVAL_SECONDS:-60}
7575BOT_TRANSFERS_FOLLOW_CHAIN=${BOT_TRANSFERS_FOLLOW_CHAIN:- NONE}
7676BOT_SWAPS_FOLLOW_CHAIN=${BOT_SWAPS_FOLLOW_CHAIN:- NONE}
7777
78+ RPC_INGRESS_ENABLED=${RPC_INGRESS_ENABLED:- false}
79+ RPC_INGRESS_HOST=${RPC_INGRESS_HOST:- }
80+ RPC_INGRESS_STATIC_IP_NAME=${RPC_INGRESS_STATIC_IP_NAME:- }
81+ RPC_INGRESS_SSL_CERT_NAME=${RPC_INGRESS_SSL_CERT_NAME:- }
82+
7883FLUSH_ENTRY_QUEUE=${FLUSH_ENTRY_QUEUE:- true}
7984
8085# #######################
@@ -299,6 +304,11 @@ BOT_SWAPS_TX_INTERVAL_SECONDS = ${BOT_SWAPS_TX_INTERVAL_SECONDS}
299304BOT_SWAPS_FOLLOW_CHAIN = "${BOT_SWAPS_FOLLOW_CHAIN} "
300305BOT_TRANSFERS_PRIVATE_KEY = "${BOT_TRANSFERS_PRIVATE_KEY:- 0xcafe01} "
301306BOT_SWAPS_PRIVATE_KEY = "${BOT_SWAPS_PRIVATE_KEY:- 0xcafe02} "
307+
308+ RPC_INGRESS_ENABLED = ${RPC_INGRESS_ENABLED}
309+ RPC_INGRESS_HOST = "${RPC_INGRESS_HOST} "
310+ RPC_INGRESS_STATIC_IP_NAME = "${RPC_INGRESS_STATIC_IP_NAME} "
311+ RPC_INGRESS_SSL_CERT_NAME = "${RPC_INGRESS_SSL_CERT_NAME} "
302312EOF
303313
304314tf_run " ${DEPLOY_AZTEC_INFRA_DIR} " " ${DESTROY_AZTEC_INFRA} " " ${CREATE_AZTEC_INFRA} "
Original file line number Diff line number Diff line change @@ -159,10 +159,21 @@ locals {
159159 " rpc.yaml" ,
160160 " rpc-resources-${ var . RPC_RESOURCE_PROFILE } .yaml"
161161 ]
162- custom_settings = {
163- " nodeType" = " rpc"
164- " node.env.NETWORK" = var.NETWORK
165- }
162+ custom_settings = merge (
163+ {
164+ " nodeType" = " rpc"
165+ " node.env.NETWORK" = var.NETWORK
166+ " ingress.rpc.enabled" = var.RPC_INGRESS_ENABLED
167+ " ingress.rpc.host" = var.RPC_INGRESS_HOST
168+ },
169+ var. RPC_INGRESS_ENABLED ? {
170+ " service.rpc.annotations.cloud\\.google\\.com/neg" = " {\" ingress\" : true}"
171+ " ingress.rpc.annotations.kubernetes\\.io/ingress\\.class" = " gce"
172+ " ingress.rpc.annotations.kubernetes\\.io/ingress\\.global-static-ip-name" = var.RPC_INGRESS_STATIC_IP_NAME
173+ " ingress.rpc.annotations.ingress\\.gcp\\.kubernetes\\.io/pre-shared-cert" = var.RPC_INGRESS_SSL_CERT_NAME
174+ " ingress.rpc.annotations.kubernetes\\.io/ingress\\.allow-http" = " false"
175+ } : {}
176+ )
166177 boot_node_host_path = " node.env.BOOT_NODE_HOST"
167178 bootstrap_nodes_path = " node.env.BOOTSTRAP_NODES"
168179 }
Original file line number Diff line number Diff line change @@ -358,3 +358,28 @@ variable "BOT_SWAPS_PRIVATE_KEY" {
358358 default = null
359359 nullable = true
360360}
361+
362+ # RPC ingress configuration (GKE-specific)
363+ variable "RPC_INGRESS_ENABLED" {
364+ description = " Enable GKE ingress for RPC nodes"
365+ type = bool
366+ default = false
367+ }
368+
369+ variable "RPC_INGRESS_HOST" {
370+ description = " Hostname for RPC ingress"
371+ type = string
372+ default = " "
373+ }
374+
375+ variable "RPC_INGRESS_STATIC_IP_NAME" {
376+ description = " Name of the GCP static IP resource for the ingress"
377+ type = string
378+ default = " "
379+ }
380+
381+ variable "RPC_INGRESS_SSL_CERT_NAME" {
382+ description = " Name of the GCP managed SSL certificate for the ingress"
383+ type = string
384+ default = " "
385+ }
Original file line number Diff line number Diff line change 1+ resource "google_compute_global_address" "staging_public_rpc_ip" {
2+ name = " staging-rc-1-ingress"
3+ description = " Static IP for staging-public network RPC ingress"
4+
5+ lifecycle {
6+ prevent_destroy = true
7+ }
8+ }
9+
10+ resource "google_compute_managed_ssl_certificate" "staging_public_rpc_cert" {
11+ name = " staging-public-rpc-cert"
12+ description = " Managed SSL certificate for staging-public RPC ingress"
13+
14+ managed {
15+ domains = [" staging.alpha-testnet.aztec-labs.com" ]
16+ }
17+
18+ lifecycle {
19+ prevent_destroy = true
20+ }
21+ }
22+
23+ # TODO: enable these resources once testnet is migrated to use deploy_network.sh
24+
25+ # resource "google_compute_global_address" "testnet_rpc_ip" {
26+ # name = "testnet-rpc-ingress"
27+ # description = "Static IP for testnet RPC ingress"
28+ #
29+ # lifecycle {
30+ # prevent_destroy = true
31+ # }
32+ # }
33+ #
34+ # resource "google_compute_managed_ssl_certificate" "testnet_rpc_cert" {
35+ # name = "testnet-rpc-cert"
36+ # description = "Managed SSL certificate for testnet RPC ingress"
37+ #
38+ # managed {
39+ # domains = ["rpc.testnet.aztec-labs.com"]
40+ # }
41+ #
42+ # lifecycle {
43+ # prevent_destroy = true
44+ # }
45+ # }
Original file line number Diff line number Diff line change @@ -6,3 +6,13 @@ output "region" {
66 description = " Google cloud region"
77 value = var. region
88}
9+
10+ output "staging_public_rpc_ip" {
11+ value = google_compute_global_address. staging_public_rpc_ip . address
12+ description = " The static IP address for staging-public RPC ingress"
13+ }
14+
15+ output "staging_public_rpc_cert_name" {
16+ value = google_compute_managed_ssl_certificate. staging_public_rpc_cert . name
17+ description = " The name of the managed SSL certificate for staging-public RPC"
18+ }
You can’t perform that action at this time.
0 commit comments