Skip to content

Commit

Permalink
Add AAAA records for API and ingress in DNS zone template
Browse files Browse the repository at this point in the history
  • Loading branch information
simu committed Aug 16, 2023
1 parent 4deb35c commit 0ff0897
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions lb.tf
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ module "lb_api_int" {
subnet_uuid = local.subnet_uuid
members = module.master.ip_addresses[*]
ports = [6443, 22623]
// TODO(sg): Switch to .100 for api-int
internal_vip = cidrhost(var.privnet_cidr, 99)

health_check = {
Expand Down
2 changes: 2 additions & 0 deletions outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@ output "dns_entries" {
value = templatefile("${path.module}/templates/dns.zone", {
"node_name_suffix" = local.node_name_suffix,
"api_vip" = module.lb_api.vip_v4[0]
"api_vip_v6" = module.lb_api.vip_v6[0]
"router_vip" = module.lb_ingress.vip_v4[0]
"router_vip_v6" = module.lb_ingress.vip_v6[0]
"egress_vip" = var.lb_count != 0 ? split("/", module.lb.nat_vip[0].network)[0] : ""
"internal_vip" = module.lb_api_int.vip_v4[0]
"masters" = module.master.ip_addresses,
Expand Down
2 changes: 2 additions & 0 deletions templates/dns.zone
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@
$ORIGIN ${node_name_suffix}.

api IN A ${api_vip}
api IN AAAA ${api_vip_v6}
api-int IN A ${internal_vip}
ingress IN A ${router_vip}
ingress IN AAAA ${router_vip_v6}
egress IN A ${egress_vip}

*.apps IN CNAME ingress.${node_name_suffix}.
Expand Down

0 comments on commit 0ff0897

Please sign in to comment.