Skip to content

Propose automatic private DNS names for Compute instances - #470

Open
scotwells wants to merge 27 commits into
mainfrom
docs/internal-dns-compute
Open

scotwells wants to merge 27 commits into
mainfrom
docs/internal-dns-compute

Conversation

@scotwells

@scotwells scotwells commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Proposes automatic private DNS names and resolver settings for Compute instances attached to a VPC. Every VPC uses the default datum.internal domain with isolated records. Users can resolve short names without choosing a DNS zone or maintaining address records. Compute publishes addresses and eligibility together through project-scoped permissions, while DNS reports publication status and network services manages resolver access.

Test plan

  • Check document whitespace.
  • Compare API examples with the DNS publication contract.
  • Verify documentation CI.
  • Verify required repository checks.

@scotwells
scotwells requested review from ecv and privateip October 21, 2026 22:03
@scotwells
scotwells marked this pull request as ready for review October 22, 2026 00:38
@scotwells
scotwells requested a review from a team as a code owner October 22, 2026 00:38

@ecv ecv left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Requesting changes. Instance-name uniqueness is not designed. The decision list is on dns-operator#229.

Names collide in the flat namespace. Compute sets DNSRegistration.spec.name to the instance name, which is unique per namespace, not per VPC. Two namespaces on one Network, or an instance and a Connect export, can claim the same <name>.datum.internal. Specify the outcome: a suffix, a rejection, or a failed status. "A recreated instance can use the same hostname after the previous registration is withdrawn" is a race, and another publisher can take the name in the gap.

Also worth fixing:

  • The doc copies DNSRegistration and DNSRecordContribution YAML that dns-operator owns, and the fields already differ. Link to it instead.
  • Peered aliases such as web-01.application.production.datum.internal belong in the DNS or Network Services design. Drop them here, or mark them deferred.
  • Published state is retained through a Compute outage with no maximum age. Record that as an accepted risk alongside the dns-operator decision.
  • The doc says an instance on several VPCs uses one label in each, while a non-goal rules out several managed DNS contexts in one guest. Say what a guest with two VPC NICs gets.
  • The four Go test files changed here (analysis_test.go, deploy_test.go, lookup_test.go, render_test.go) are unrelated to the doc. Explain them or drop them.

scotwells and others added 2 commits October 22, 2026 14:42
Main now carries the same lint guards this branch added to four unrelated test files, so after the merge the pull request changes only the Compute DNS proposal.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review on #470 found instance-name uniqueness undesigned. Each VPC's managed zone is one flat namespace shared by every publisher, and Compute derives the label from an Instance name that is unique only within its namespace. The proposal now states the outcome DNS already implements: the oldest registration keeps a contested name, the loser reports NameConflict on its registration and in Instance.status.dns, and nothing is renamed. A recreated Instance does not reclaim its old name ahead of a registration that was already waiting; whether it should is recorded as an open question. It also notes that publication is limited today to Networks in the Instance's namespace.

The copied DNSRegistration and DNSRecordContribution YAML is replaced by a link to the dns-operator types and a description of what Compute writes. Peered-network aliases are deferred to the DNS and network services designs. Retaining published state through a Compute outage with no maximum age is recorded as an accepted risk alongside the dns-operator decision. The proposal says what a guest on two managed VPCs gets, uses the DNSConfigured reasons the network services API defines, and describes publication from NetworkInterface allocation addresses with the runtime Pod and node as health gates, matching compute#518.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@scotwells

Copy link
Copy Markdown
Contributor Author

Addressed in 6eb4407 (and the main merge 54d252b):

  • Name uniqueness. The doc now describes DNS's rule: static records first, then the oldest registration. A losing registration reports NameConflict and shows up in Instance.status.dns with no hostname. There is no suffix and no retry. A recreated instance queues behind registrations already waiting for the name. Whether a replacement should keep its predecessor's name is listed as an open question. Today Compute only publishes for Networks in the Instance's own namespace, so the two-namespace collision can't happen yet. The doc says that cross-namespace attachments need a naming decision first.
  • DNS types. The DNSRegistration/DNSRecordContribution YAML is gone. The doc links to the dns-operator types and only describes what Compute writes.
  • Peered aliases. Deferred to the DNS and NSO designs.
  • No maximum age. Recorded as an accepted risk, with a link to the dns-operator retention decision.
  • Two VPC NICs. Records are published in both VPCs, but the guest itself gets no managed resolver and reports UnsupportedMultipleContexts, consistent with network-services-operator#589. The DNSConfigured reason is now Applied.
  • Addresses. Addresses come from NetworkInterface allocations, with the Pod and node acting only as health gates, matching fix: Publish internal DNS from interface allocations #518.
  • Test files. Main already has the same lint guards, so after merging main the PR only touches the doc.

Peered names are not part of the delivered design. Label the section as future work and state, as the DNS architecture does, that network peering does not share zones or extend DNS access.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@scotwells

Copy link
Copy Markdown
Contributor Author

Following up on the peered-names note from the dns-operator#229 review: the doc has no peered-name user story anymore. In a448301 I renamed the remaining section to "Future work: peered networks" and added #229's statement that peering does not share zones or extend DNS access.

@scotwells
scotwells requested a review from ecv October 22, 2026 19:45

@ecv ecv left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving at a448301. Name uniqueness is specified (oldest registration wins, NameConflict on the Instance, no suffix), the copied YAML is now a link, peered names are future work, a two-VPC guest gets UnsupportedMultipleContexts, and the unrelated test files are gone. Two text fixes before merge:

  • Goals still says "Bound stale answers when instances disappear or publishers lose connectivity", which contradicts the accepted risk of no maximum age. Reword it to withdraw on confirmed deletion and retain during outages.
  • The dns-operator link points at the fix/internal-dns-name-references branch. Repoint it to main or a SHA once dns-operator#244 lands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants