diff --git a/bootstrap/main.tf b/bootstrap/main.tf index ca9b409..99ed822 100644 --- a/bootstrap/main.tf +++ b/bootstrap/main.tf @@ -18,7 +18,7 @@ module "node_v1_feature" { } // blue (once we have a green, we can update its name to proxy-blue) -module "node_v1_proxy" { +module "node_v1_proxy_blue" { depends_on = [kubernetes_namespace.namespace] source = "./proxy" namespace = var.namespace @@ -29,7 +29,8 @@ module "node_v1_proxy" { resources = var.proxy_resources instances_namespace = var.proxy_blue_instances_namespace healthcheck_port = var.proxy_blue_healthcheck_port - name = "proxy" + environment = "blue" + name = "proxy-blue" } module "node_v1_proxy_green" { diff --git a/bootstrap/proxy/config.tf b/bootstrap/proxy/config.tf index 4e86618..d7cf418 100644 --- a/bootstrap/proxy/config.tf +++ b/bootstrap/proxy/config.tf @@ -40,7 +40,7 @@ locals { "name" = "3", "max_connections" = 75 "rates" = [ - { + { "interval" = "1m", "limit" = 1024 * 1024 * 60 * 2 } diff --git a/bootstrap/proxy/deployment.tf b/bootstrap/proxy/deployment.tf index b0d27f9..0015191 100644 --- a/bootstrap/proxy/deployment.tf +++ b/bootstrap/proxy/deployment.tf @@ -14,7 +14,7 @@ resource "kubernetes_deployment_v1" "node_proxy" { } template { metadata { - name = local.name + name = local.name labels = local.proxy_labels } spec { diff --git a/bootstrap/proxy/main.tf b/bootstrap/proxy/main.tf index a07f484..ab37c9d 100644 --- a/bootstrap/proxy/main.tf +++ b/bootstrap/proxy/main.tf @@ -84,4 +84,4 @@ variable "dns_zone" { variable "healthcheck_port" { type = number -} \ No newline at end of file +} diff --git a/bootstrap/relay/main.tf b/bootstrap/relay/main.tf index 997ffee..23bf9c0 100644 --- a/bootstrap/relay/main.tf +++ b/bootstrap/relay/main.tf @@ -14,7 +14,7 @@ resource "kubernetes_service_v1" "node-relay-n2n" { } spec { - type = "LoadBalancer" + type = "LoadBalancer" load_balancer_class = "service.k8s.aws/nlb" selector = { @@ -23,23 +23,23 @@ resource "kubernetes_service_v1" "node-relay-n2n" { } port { - name = "mainnet" - protocol = "TCP" - port = 3000 + name = "mainnet" + protocol = "TCP" + port = 3000 target_port = "n2n-mainnet" } port { - name = "preprod" - protocol = "TCP" - port = 3001 + name = "preprod" + protocol = "TCP" + port = 3001 target_port = "n2n-preprod" } port { - name = "preview" - protocol = "TCP" - port = 3002 + name = "preview" + protocol = "TCP" + port = 3002 target_port = "n2n-preview" } diff --git a/bootstrap/service/main.tf b/bootstrap/service/main.tf index e48d70d..d106037 100644 --- a/bootstrap/service/main.tf +++ b/bootstrap/service/main.tf @@ -12,7 +12,7 @@ variable "release" { variable "active_salt" { description = "the salt to use for the active network" - default = "" + default = "" } locals { diff --git a/bootstrap/variables.tf b/bootstrap/variables.tf index 59bb058..0acdf2f 100644 --- a/bootstrap/variables.tf +++ b/bootstrap/variables.tf @@ -73,7 +73,7 @@ variable "proxy_green_replicas" { variable "proxy_green_healthcheck_port" { type = number description = "The port the loadbalancer assigned to the HTTP endpoint of the service. Usually known after the service is created. The default is the target-port." - default = null + default = null } variable "proxy_green_instances_namespace" {