Skip to content

Publish private DNS names for compute instances - #451

Merged
scotwells merged 49 commits into
mainfrom
feat/internal-dns-instance-publishing
Oct 22, 2026
Merged

scotwells merged 49 commits into
mainfrom
feat/internal-dns-instance-publishing

Conversation

@scotwells

@scotwells scotwells commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Compute publishes private instance names in each attached network, such as web-01.datum.internal. Instance.status.dns reports each network's hostname and publication readiness. DNS rejects conflicting name claims and Compute reports NameConflict.

Publication is disabled by default. Enable InternalDNSPublishing on management and cell controllers after provisioning DNS, observation credentials, and publisher permissions in every project control plane. The enhancement documents the required grants and checks; installing management-cluster RBAC alone does not grant access to Milo project APIs.

Unavailable observations retain records. Confirmed network withdrawal, stopped runtimes, unhealthy nodes, and deletion withdraw addresses. Application readiness does not remove an instance's identity name. With publication disabled, instance projection identity and network interface status writes retain their standard behavior.

Validation

  • Passed controller, command, and configuration tests, including local Kubernetes API tests.
  • Passed lint with zero issues.
  • Added regressions for disabled-feature compatibility, source identity, name conflicts, and polling jitter.
  • CI checks full end-to-end behavior and image builds.

Keep private names aligned with endpoint eligibility through one atomic
publication. Preserve DNS-owned readiness and retain records when edge
observations are unavailable.
@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. The body says publication is off by default, but some of this changes behavior for every customer with the gate off, and CI is red.

Ungated behavior changes ship to production on the next tag.

  • instance_projector.go now deletes and recreates a customer's Instance projection whenever InstanceSourceUIDLabel changes. Before, it updated the projection in place.
  • instance_controller.go stamps that label unconditionally.
  • A project-side finalizer then holds recreation, and the 1ms requeue has no backoff.
  • networkinterface_holder.go moves NetworkInterface condition writes from Status().Update to an optimistic-lock Status().Patch for everyone.

Put these behind InternalDNSPublishing, or split them into their own PR and soak.

The project-side RBAC is not wired. Nothing references config/components/internal-dns-rbac. The body says project RBAC authorizes writes to dnsregistrations, dnsrecordcontributions and dnsresolvercontexts, but no manifest here grants them. Wire the component into an overlay and say where the Milo-side grant lives, or make it a stated precondition for turning the gate on.

CI: lint fails on goconst in internaldns_observation_test.go (fd20::1234 and fd20::/96 repeat), and both "Run on Ubuntu" jobs fail.

Also worth fixing:

  • allocatedInstanceDNSName maps every other character to -, so a.b and a-b both become a-b. Hash-suffix any name it changes, or show that the DNS side rejects the second claim.
  • Every Instance requeues every 30s, with about 8 sequential edge reads per NIC under one 10s context. Add jitter or drive it from watches, and state the expected QPS.
  • The LocationSource comment in internal/config/config.go drops the line that says NetworkServices is refused. Restore it.

@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 1f22c9b. InternalDNSPublishing defaults off, and with it off the projector, label stamping and NIC status write match main. Tests cover each gate-off path. The enablement doc lists the per-project grants as a precondition for turning the gate on, the poll interval has jitter, and the LocationSource comment is restored. The fix commits add comments to the projector and publisher, and the projector's "A changed source Instance UID replaces the projection" is wrong with the gate off. Trim or correct them.

@scotwells
scotwells merged commit d1f1cac into main Oct 22, 2026
10 checks passed
@scotwells
scotwells deleted the feat/internal-dns-instance-publishing branch October 22, 2026 02:27
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