Skip to content

Label and describe Private DNS resolver contexts by their network - #851

Merged
scotwells merged 3 commits into
mainfrom
feat/internal-dns-context-network-labels
Nov 3, 2026
Merged

scotwells merged 3 commits into
mainfrom
feat/internal-dns-context-network-labels

Conversation

@scotwells

@scotwells scotwells commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Requested by Scot Schuchert-Wells

What

The DNSResolverContext created for a network now carries:

  • the well-known network labels networking.datumapis.com/network (name, skipped when too long for a label value) and networking.datumapis.com/network-uid;
  • kubernetes.io/description: Private DNS for the <network> VPC, using the network's display name when it has one;
  • dns.networking.miloapis.com/managed-object-labels, asking DNS to copy the two network labels to the managed zone.

Existing contexts are updated on the next reconcile, and the description follows display name changes. Writes are best effort: a failure is logged and never holds up DNS access.

Why

DNS copies these to the managed datum.internal zone, so the portal's Description column says which VPC each zone is for, and the zone's labels name the network.

Related: datum-cloud/enhancements#921

Companion PRs: #851, datum-cloud/dns-operator#456, datum-cloud/cloud-portal#1788

The DNSResolverContext for a network now carries the network name and
UID labels, and existing contexts get them on the next pass. DNS copies
these labels to the context's managed zone, so the zone names its VPC.
Set the managed-object-labels annotation so DNS copies the network
labels to the managed zone, and log a failed label write instead of
holding up DNS access.
Set kubernetes.io/description to "Private DNS for the <network> VPC",
using the network's display name when it has one. DNS copies it to the
managed zone, which the portal shows as the zone description.
@scotwells scotwells changed the title Label Private DNS resolver contexts with their network Label and describe Private DNS resolver contexts by their network Nov 3, 2026
@scotwells
scotwells marked this pull request as ready for review November 3, 2026 17:57
@scotwells
scotwells requested a review from a team as a code owner November 3, 2026 17:57

@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.

Approve.

New and existing resolver contexts get the network labels, the copy-labels annotation and the description; a failed label write is logged and never blocks DNS access. Keys match dns-operator#456 (dns.networking.miloapis.com/managed-object-labels, kubernetes.io/description).

  • The annotation and label keys line up with dns-operator#456, and the order is safe either way: until dns-operator ships, the annotations are inert.
  • The portal (cloud-portal#1788) reads spec.visibility, not these labels or the description, so nothing here changes what the portal shows. Zones made before the change already show "Private" in the portal, since dns-operator already set Visibility: Private on managed zones.
  • internalDNSNetworkLabels skips the name label when it is not a valid label value and keeps the UID label, covered by the long-name test.

Follow-ups:

  • The patch error on an existing context is logged on every reconcile pass while it fails; consider rate-limiting or surfacing it as a condition.
  • Nothing yet consumes the network label or description in the portal; the stack's description and labels have no reader until a follow-up lands.

@kevwilliams kevwilliams 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.

Verified a failed label write on an existing context is logged and never blocks DNS access, and the long-name and pre-existing-context paths are both tested.

@scotwells
scotwells merged commit 49d16c2 into main Nov 3, 2026
11 checks passed
@scotwells
scotwells deleted the feat/internal-dns-context-network-labels branch November 3, 2026 19:44
scotwells added a commit to datum-cloud/cloud-portal that referenced this pull request Nov 3, 2026
<!-- claude-projects-attribution: {"github_login":"scotwells"} -->
_Requested by **Scot Schuchert-Wells**_

## Description

Private DNS zones (`spec.visibility: Private`, such as each VPC's
`datum.internal` zone) never get public nameservers, so the DNS list
showed "Looking up..." for them forever.

- The DNS Host column shows "Private" for private zones instead of the
spinner.
- The zone page hides the Nameservers tab for private zones.

Which VPC a zone serves shows up in the existing Description column: the
operator changes linked below set the zone's `kubernetes.io/description`
to "Private DNS for the ‹network› VPC".

Related: datum-cloud/enhancements#921

Companion PRs: datum-cloud/network-services-operator#851,
datum-cloud/dns-operator#456, #1788
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.

3 participants