File tree Expand file tree Collapse file tree 3 files changed +54
-28
lines changed
Expand file tree Collapse file tree 3 files changed +54
-28
lines changed Original file line number Diff line number Diff line change @@ -243,10 +243,10 @@ jobs:
243243 BOT_SWAPS_REPLICAS=0
244244 FLUSH_ENTRY_QUEUE=false
245245
246- # RPC_INGRESS_ENABLED=true
247- # RPC_INGRESS_HOST=rpc.testnet.aztec-labs.com
248- # RPC_INGRESS_STATIC_IP_NAME=testnet-rpc-ingress
249- # RPC_INGRESS_SSL_CERT_NAME=testnet-rpc-cert
246+ RPC_INGRESS_ENABLED=true
247+ RPC_INGRESS_HOST=rpc.testnet.aztec-labs.com
248+ RPC_INGRESS_STATIC_IP_NAME=testnet-rpc-ip
249+ RPC_INGRESS_SSL_CERT_NAME=testnet-rpc-cert
250250
251251 EOF
252252 echo "NAMESPACE=$NAMESPACE" >> $GITHUB_ENV
Original file line number Diff line number Diff line change @@ -194,7 +194,10 @@ locals {
194194 service = {
195195 rpc = {
196196 annotations = {
197- " cloud.google.com/neg" = " {\" ingress\" : true}"
197+ " cloud.google.com/neg" = jsonencode ({ ingress = true })
198+ " cloud.google.com/backend-config" = jsonencode ({
199+ default = " ${ var . RELEASE_PREFIX } -rpc-ingress-backend"
200+ })
198201 }
199202 }
200203 }
@@ -319,3 +322,28 @@ resource "helm_release" "releases" {
319322 }
320323 }
321324}
325+
326+ resource "kubernetes_manifest" "rpc_ingress_backend" {
327+ count = var. RPC_INGRESS_ENABLED ? 1 : 0
328+ provider = kubernetes. gke-cluster
329+
330+ manifest = {
331+ apiVersion = " cloud.google.com/v1"
332+ kind = " BackendConfig"
333+ metadata = {
334+ name = " ${ var . RELEASE_PREFIX } -rpc-ingress-backend"
335+ namespace = var.NAMESPACE
336+ }
337+ spec = {
338+ healthCheck = {
339+ checkIntervalSec = 15
340+ timeoutSec = 5
341+ healthyThreshold = 2
342+ unhealthyThreshold = 2
343+ type = " HTTP"
344+ port = 8080
345+ requestPath = " /status"
346+ }
347+ }
348+ }
349+ }
Original file line number Diff line number Diff line change @@ -20,26 +20,24 @@ resource "google_compute_managed_ssl_certificate" "staging_public_rpc_cert" {
2020 }
2121}
2222
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- # }
23+ resource "google_compute_global_address" "testnet_rpc_ip" {
24+ name = " testnet-rpc-ip"
25+ description = " Static IP for testnet RPC ingress"
26+
27+ lifecycle {
28+ prevent_destroy = true
29+ }
30+ }
31+
32+ resource "google_compute_managed_ssl_certificate" "testnet_rpc_cert" {
33+ name = " testnet-rpc-cert"
34+ description = " Managed SSL certificate for testnet RPC ingress"
35+
36+ managed {
37+ domains = [" rpc.testnet.aztec-labs.com" ]
38+ }
39+
40+ lifecycle {
41+ prevent_destroy = true
42+ }
43+ }
You can’t perform that action at this time.
0 commit comments