GIDINET: Auto-suggest nameservers and add premium DNS helper#4203
Open
zupolgec wants to merge 1 commit intoDNSControl:mainfrom
Open
GIDINET: Auto-suggest nameservers and add premium DNS helper#4203zupolgec wants to merge 1 commit intoDNSControl:mainfrom
zupolgec wants to merge 1 commit intoDNSControl:mainfrom
Conversation
- GetNameservers now returns the static free-tier nameservers (dnsl1/dnsl2.gidinet.com) so DNSControl can derive registrar delegation without requiring an explicit NAMESERVER() in the zone file (previously returned nil, nil). - Add GIDINET_PREMIUM_NS() JS helper that emits the five premium nameserver records (dns1..dns5.gidinet.com). Use it together with DnsProvider(DSP_GIDINET, 0) to opt out of the free-tier defaults for zones on Gidinet's premium DNS tier. - filterApexNS now drops apex NS records synthesized from dc.Nameservers silently (previously warned on every preview once GetNameservers started returning values); still warns on truly unexpected apex NS targets. - Document both tiers, with examples for each.
8137e74 to
1c29159
Compare
Collaborator
|
Thank you for sending this! Right now the project is in transition but I hope to be able to address this once we've moved to our new git org. |
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.
Summary
GetNameserversnow returns the static free-tier Gidinet nameservers (dnsl1/dnsl2.gidinet.com). Previously it returnednil, nil, which meant DNSControl could not derive registrar delegation from the DNS provider for Gidinet-hosted zones. With this change, zones declared asD(..., REG_GIDINET, DnsProvider(DSP_GIDINET), ...)get correct NS suggestions automatically, matching the behavior of providers like Cloudflare or netcup.GIDINET_PREMIUM_NS()JS helper that emitsNAMESERVER("dns1..dns5.gidinet.com.")for zones on Gidinet's premium DNS tier. Intended to be paired withDnsProvider(DSP_GIDINET, 0)so the free-tier defaults fromGetNameserversare skipped and only the five premium nameservers drive the delegation.filterApexNSnow drops apex NS records silently when they were synthesized fromdc.Nameservers(either auto-injected byGetNameserversor declared viaNAMESERVER()), sinceAddNSRecordsadds those todc.Recordsautomatically. Previously it warned on every preview onceGetNameserversbegan returning values. Truly unexpected apex NS targets (e.g. a strayNS("@", "something-else.")) still emit a warning because the Gidinet DNS API cannot honor them.GIDINET_PREMIUM_NS()usage pattern.Motivation
Before this change, a zone served by Gidinet DNS required a redundant
NS_GIDINET()-style block of explicitNAMESERVER()calls just soREG_GIDINETcould propose the correct delegation. Users hit a no-op/warning loop where the registrar had nothing to compare against and/or where apex NS records raised spurious warnings. Gidinet's nameservers are static per-tier, so returning them fromGetNameserversis safe and matches the convention used by other providers.Test plan
go test ./...go vet ./...gofmt -l providers/gidinet/ pkg/js/dnscontrol checkon a real Gidinet-hosted configurationdnscontrol previewon a free-tier zone: registrar correctly proposesdnsl1/dnsl2.gidinet.comdelegation without explicitNAMESERVER()in the zone file; no spurious apex-NS warnings.dnscontrol previewon a premium-tier zone usingDnsProvider(DSP_GIDINET, 0) + GIDINET_PREMIUM_NS()(pending availability of a premium zone for the author to validate end-to-end).print-ir) on a synthetic premium-tier config confirms the helper expands to the fiveNAMESERVER("dns1..5.gidinet.com.")entries.Notes
NAMESERVER("dnsl1/dnsl2…")records still work (the registrar-side dedup already handles duplicates).