fix: expose the lighthouse queue redis over PrivateLink#597
Closed
otsybizov wants to merge 1 commit intomainnet-stagingfrom
Closed
fix: expose the lighthouse queue redis over PrivateLink#597otsybizov wants to merge 1 commit intomainnet-stagingfrom
otsybizov wants to merge 1 commit intomainnet-stagingfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR exposes the lighthouse queue Redis from the “core” VPC to the “backend” VPC via AWS PrivateLink, and updates the BullMQ Redis URL parsing to support TLS SNI overrides when connecting through a PrivateLink DNS name.
Changes:
- Extend
parseRedisUrlto support?tlsServername=...and standardize Redis connection timeouts/retry options. - Add reusable Terraform PrivateLink modules (
providerNLB + endpoint service,consumerinterface endpoint). - Wire the new modules into
ops/mainnet/stagingcore/backend stacks and updateREDIS_URLto use the PrivateLink endpoint with correct SNI.
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/adapters/mqclient/src/index.ts | Adds TLS SNI override support and Redis connection tuning for BullMQ connections. |
| ops/modules/privatelink/provider/variables.tf | Defines inputs for the provider-side PrivateLink module. |
| ops/modules/privatelink/provider/main.tf | Creates internal NLB + target group + endpoint service for exposing a TCP target over PrivateLink. |
| ops/modules/privatelink/provider/outputs.tf | Exposes endpoint service name (and NLB ARN) for consumers. |
| ops/modules/privatelink/consumer/variables.tf | Defines inputs for the consumer-side endpoint module. |
| ops/modules/privatelink/consumer/main.tf | Creates interface endpoint + security group for consuming the provider service. |
| ops/modules/privatelink/consumer/outputs.tf | Exposes endpoint DNS name/id to be used by clients. |
| ops/mainnet/staging/core/main.tf | Instantiates the provider module to expose lighthouse queue Redis via PrivateLink. |
| ops/mainnet/staging/core/outputs.tf | Exports service name/port/auth/address needed by backend via remote state. |
| ops/mainnet/staging/backend/main.tf | Instantiates the consumer module in the backend VPC. |
| ops/mainnet/staging/backend/config.tf | Switches REDIS_URL to use the PrivateLink endpoint DNS + tlsServername override. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+5
to
+14
| resource "aws_security_group" "endpoint" { | ||
| name = "pl-endpoint-${var.environment}-${var.stage}-${var.family}" | ||
| description = "Allow traffic to PrivateLink endpoint for ${var.family}" | ||
| vpc_id = var.vpc_id | ||
|
|
||
| ingress { | ||
| from_port = var.port | ||
| to_port = var.port | ||
| protocol = "tcp" | ||
| cidr_blocks = ["0.0.0.0/0"] |
Comment on lines
+44
to
+45
| target_group_arn = aws_lb_target_group.this.arn | ||
| target_id = data.dns_a_record_set.target.addrs[0] |
Comment on lines
+4
to
+7
| # Service endpoints are typically DNS names; resolve to IP for the NLB target group. | ||
| data "dns_a_record_set" "target" { | ||
| host = var.target_address | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🤖 Linear
Closes CONG-XXX