Repository navigation
feat(dns): honor towonel.io/dns-record to opt hostnames out of the DNS handoff - #97
Merged
Merged
Conversation
…S handoff A Service, Gateway or HTTPRoute annotated `towonel.io/dns-record` with a value that is present and not truthy (typos included; unrecognized values also raise a Warning Event) stamps `dnsRecord: false` on the agent services it contributes. The new optional `TowonelAgent.spec.services[].dnsRecord` field lets hand-written agents do the same. The tunnel leaves any hostname that any referencing agent opts out of the DNSEndpoint and status.dnsRecords (explicit opt-out wins); hub authorization is unaffected. An ObserveOnly agent that serves an opted-out hostname without the field gets a Warning. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- The towonel.io/dns-record opt-out and dnsRecord field (source layer, agent CRD reference, example, README). - Zone-apex hostnames: provider-dependent apex CNAMEs and the opt-out + ALIAS/A remedy. - Recipe B as a worked alternative to Recipe A: audit, label LAN-only and tunneled routes `lan`, `!=lan` on the reused public instance, `!=public` on the LAN instance; Gateways are only filtered by --gateway-label-filter. - k8s_gateway on the LAN (canonical codeberg repo, ignore label). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… test The DNSEndpoint is applied before the tunnel's status write. Mutating the spec in that window conflicts the status update, so inviteId is never persisted; the delete then takes the invite-less path that needs no API key and removes the finalizer, failing the follow-up update with NotFound. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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
A per-object opt-out for the DNS handoff, plus the docs the operator survey called for. It lands before v1.10.0 is cut, so it ships in the same release as the handoff.
InvalidAnnotation.DNSEndpointandstatus.dnsRecords.ObserveOnlyagent that serves an opted-out hostname withoutdnsRecord: falsegets a Warning, not silence.docs/dns.md):lan, then!=lanon the public instance and!=publicon the LAN one. Gateways are filtered only by--gateway-label-filter(external-dnssource/gateway.go:156-160).Evidence
TestDNSRecordAnnotationKeepsHostnameOutOfDNSEndpointfailed:endpoints = [extra private public], want [extra public].After: it passes, as does
TestDNSRecordAnnotationRemovalRepublishesHostname(removing the annotation clearsdnsRecordand republishes the hostname).TestApplyDNSRecordAnnotation: absent, truthy, falsy, typo and empty values.TestObserveUserAgentWarnsWhenDNSOptOutNotOnAgent.TestDesiredDNSEndpointOptOutandTestDNSOptOutHostnames.optOutfilter, the fail-closed branch or the observe-only warning each makes a test fail.task ciexits 0 (fmt, vet,-racetests with envtest, helm lint and template, verify-generated).Merge Danger
Door: two-way. The field is additive and optional, and the annotation only removes records.
Blast Radius: DNS records
Raw-manifest installs must update the TowonelAgent CRD before relying on the annotation. A stale CRD that silently prunes
dnsRecordleaves the hostname published.🤖 Generated with Claude Code