fix: Use relative owner names for Gateway DNS - #318
Conversation
Gateway-managed DNSRecordSets stored absolute FQDNs in records[].name while manual records use relative labels (help, @). Write owner names relative to the DNSZone and keep CNAME/ALIAS targets as FQDNs. Existing records converge on reconcile. Adds unit coverage and a Chainsaw assert. Closes #317
Task was expanding {{.Dir}} itself, so go list returned
"module version" instead of the module path and kubectl saw
two args. Escape it so e2e bring-up can install the DNS CRDs.
|
Post-merge heads up — this interacts badly with how dns-operator handles owner names. Its queue is keyed on the raw Not your bug — it's been latent in dns-operator all along, since stable owner names meant the two enqueues deduped. This just makes every gateway-managed record hit it once. Filed as datum-cloud/dns-operator#74 and fixed in datum-cloud/dns-operator#75, merged 17:12 UTC. Both orderings are covered by tests there, and both fail against unpatched main. Timing is worth flagging though: v0.24.8 put the rewrite into prod at 10:08 UTC, and the dns-operator fix isn't there yet. The agent that runs One small thing on this side: the out-of-zone fallback in Edited: originally said prod was on dns-operator v0.6.6 and needed a v0.6.7 cut. v0.6.7 already existed; the real blocker was the wedged agent Kustomization in infra#3716. |
Summary
Gateway DNS was writing
DNSRecordSetowner names as absolute FQDNs (help.example.com.). Manual records and the portal zone table use relative labels (help,@), so proxy-created rows looked wrong next to SOA/NS even though DNS still resolved.We originally chose FQDNs in enhancements#615 to remove ambiguity. In practice the zone is already on
spec.dnsZoneRef, and the mixed conventions are the real cost. This change writes owner names relative to the matched DNSZone (help,a.b,@at apex) and keeps CNAME/ALIAS content as absolute FQDNs. Existing gateway-managed records converge on the next reconcile.Testing
I tested this on staging. The record for
helpwas showing ashelp.mdj-test.onlinebefore the role out and now shows ashelppost role out. I also created a new AI Edge and added a custom hostname which worked correctly.Test plan
TestBuildDesiredDNSRecordSetSpec/TestEnsureDNSRecordSets(relative name, apex@, multi-label, casing, FQDN convergence)task test-infra:test-e2e -- ./test/e2e/gateway(asserts owner nametestand trailing-dot CNAME content)@), not the FQDNCloses #317