-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
[tf/gcp] add dns support for GCP testnet #8160
Conversation
b1673c1
to
2a17897
Compare
terraform/aptos-node/gcp/dns.tf
Outdated
@@ -56,9 +56,9 @@ resource "google_dns_record_set" "fullnode" { | |||
} | |||
|
|||
output "validator_endpoint" { | |||
value = var.zone_name != "" ? "/dns4/${trimsuffix(google_dns_record_set.validator[0].name, ".")}/tcp/${data.kubernetes_service.validator-lb[0].spec[0].port[0].port}" : null | |||
value = var.zone_name != "" && var.create_records ? "/dns4/${trimsuffix(google_dns_record_set.validator[0].name, ".")}/tcp/${data.kubernetes_service.validator-lb[0].spec[0].port[0].port}" : null |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This access path seems error prone if the service isnt present?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yea we're kinda making the assumption that the k8s services come up without issue. no way around this imo since we're still coupling infra and application release. At least it will fail with a good error
@@ -29,6 +29,9 @@ module "validator" { | |||
zone_name = var.zone_name # keep empty if you don't want a DNS name | |||
zone_project = var.zone_project | |||
record_name = var.record_name | |||
# do not create the main fullnode and validator DNS records | |||
# instead, rely on external-dns from the testnet-addons | |||
create_records = false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's call this create_dns_records
for clarity
2a17897
to
472083e
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
✅ Forge suite
|
✅ Forge suite
|
✅ Forge suite
|
Description
Add variable
var.create_dns_records
to control whether or not to create validator and fullnode specific DNS records directly on the first validator. These are only really useful in the case of deploying just a single validator/VFN, since there's 2 records that need to be created (one for validator and one for fullnode). It's simpler to create the record directly in TF rather than using an external dependency like external-dns.Since we're hosting a bunch of validators and fullnodes for testnets, we'd want each one to have a DNS name. That's a use case for external-dns. So in testnets, set
create_dns_records = false
, and let external-dns handle the restTest Plan
Lint & apply, unblocking new devnet GCP deployment