Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Attaching Route53 Alias record to the existing ALB via Service or Istio VirtualService annotation. #4450

Open
mikhail-khodorovskiy opened this issue May 8, 2024 · 0 comments
Labels
kind/feature Categorizes issue or PR as related to a new feature.

Comments

@mikhail-khodorovskiy
Copy link

What would you like to be added:
We have use cases when on a new service deploy, the Route53 A record needs to be added to the existing ALB's Alias record. The order of operation is this:

  • lookup the ALB to which attach the record by a known tag
  • create A record pointing to the HOST name of the ALB looked up above

Here is the terraform that does this

data "aws_route53_zone" "env_zone" {
  name         = "dev.test.io."
  private_zone = false
}

data "aws_lb" "external_ingress_alb" {
  tags       = var.ingress_alb_tag
}

resource "aws_route53_record" "eks_service_record" {
  zone_id = data.aws_route53_zone.env_zone.zone_id
  name    = "test-service.dev.test.io"
  type    = "A"

  alias {
    name                    = data.aws_lb.external_ingress_alb.dns_name
    zone_id                = data.aws_lb.external_ingress_alb.zone_id
    evaluate_target_health = false
  }
}

Istio Gateway/Virtual service SNI routing forwards to the correct VirtualService?service via the ALB/Ingress as long as the A record for the same hostname attached to the ALB.

Why is this needed:
Simplifies the deploy process and allows our pipeline to remove the terraform step above.

@mikhail-khodorovskiy mikhail-khodorovskiy added the kind/feature Categorizes issue or PR as related to a new feature. label May 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature.
Projects
None yet
Development

No branches or pull requests

1 participant