feat(vpc): add the VPC controller that realizes attachments on the data plane - #6
Merged
Conversation
…ridge Status becomes partially writable, the spec gains a NetworkInterface back-reference and a master-plugin selector, and a guest that manages its own addressing is now representable. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This was referenced Aug 20, 2026
Merged
…plugin interface.mode (Netns | Hypervisor) replaces interface.type (veth | tap), so galactic's plugin names stay out of a cloud-level API, and interfaceRef.uid becomes load-bearing: a mismatch means the attachment is stale. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
scotwells
force-pushed
the
feat/vpc-controller
branch
from
August 20, 2026 22:23
85bf466 to
9fd9ab3
Compare
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
scotwells
force-pushed
the
feat/vpc-controller
branch
from
August 20, 2026 23:13
9fd9ab3 to
95e19a3
Compare
This was referenced Aug 20, 2026
Merged
The controller that writes interfaceRef also sets an owner reference carrying the interface's UID, so the field restated a fact the object already held and owner-reference garbage collection already acts on. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
…ta plane Reconciles NetworkContext into a VPC identity, allocates an attachment identifier and renders a NetworkAttachmentDefinition per NetworkInterface, and projects the galactic data plane's BGPAdvertisement onto VPCAttachment and NetworkInterface status. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The attachment names the VPC, carries how the guest consumes the interface and forward-references the NetworkInterface, so it owns the NAD and every render input is reachable from it. Removes the reverse lookup that listed every attachment in a namespace to render an interface's NAD, and with it the NetworkInterface reconciler. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The controller now creates the VPCAttachment and the NAD from a bound, allocated NetworkInterface, and publishes the annotations a workload must carry so no infrastructure provider has to know what a NAD is. Attachment mode is required configuration with no default, standing in for a capability class that does not exist yet. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
…owing it An API server that does not know status.consumerAnnotations prunes it and answers success, so the write is read back and a failure to persist is reported on the attachment's Ready condition as ConsumerAnnotationsUnsupported. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Multus knowledge stays in the component that writes NetworkAttachmentDefinitions: the controller injects the annotation itself instead of publishing it for a provider to copy. Adds a Prepared condition on the interface and its claim, which is safe to gate Pod creation on, and removes status.consumerAnnotations. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
datum-cloud/compute#245 has merged, so networkInterfaceRef is on main and the branch pin this carried is no longer needed. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The attachment already carries the interface's UID in its owner reference, so the spec field and the staleness check reading it were a second copy of the same fact with nothing to decide between them. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
scotwells
force-pushed
the
feat/vpc-controller
branch
from
August 21, 2026 00:57
13a7a39 to
a9f05f0
Compare
scotwells
marked this pull request as ready for review
August 21, 2026 01:48
privateip
previously approved these changes
Aug 21, 2026
scotwells
dismissed
privateip’s stale review
August 21, 2026 01:50
The merge-base changed after approval.
privateip
previously approved these changes
Aug 21, 2026
scotwells
dismissed
privateip’s stale review
August 21, 2026 01:55
The merge-base changed after approval.
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.
Nothing in the org reconciles
VPCorVPCAttachment. Galactic's CNI requires the NAD to have been "created by the external VPC operator before the CNI is invoked" — this is that operator, and this repo's first binary.With it running in a POP cell, a compute Instance lands on a tenant VPC: NSO allocates the addresses, this controller turns them into galactic identifiers and a
NetworkAttachmentDefinition, and the data plane's own report comes back asProgrammed.Contains #5's API changes, and targets
mainrather than that branch so CI runs at all.Three reconcilers
NetworkContextVPC, with a random 48-bit identifierNetworkInterfaceVPCAttachment+ NAD + attachment identifier,status.vpc,attachmentRef,PreparedBGPAdvertisementProgrammed, and the node-scoped factsA fulfilled claim is the trigger, so no infrastructure provider creates an attachment or waits on one. Both objects are per-interface, so the identifier and the tap device name stay stable across instance replacement.
Decisions worth a reviewer's attention
A mutating Pod webhook injects
k8s.v1.cni.cncf.io/networks. Whoever writes a NAD should be the only thing that knows NADs exist, so a provider stamps one opt-in label and nothing else.failurePolicy: Failwith anobjectSelectornarrowed to that label: an outage blocks exactly the Pods that need an interface, loudly, rather than blocking the cell or letting one boot unattached. The injection is recorded on the Pod.--attachment-modeis required, with no default. Defaulting toNetnswould hand a Unikraft microVM a veth it cannot use. It stands in for a capability class that does not exist yet; there is noAttachmentClassbecause a cell hosts one implementation today.Preparedis the condition compute gates on.Programmedonly becomes true at CNI ADD, after sandbox creation, so gating Pod creation on it deadlocks.Identifiers are allocated by the leader, at random, so a freed one is not reissued while its
BGPAdvertisementis still being collected. Object names never contain base62, which is not a valid lowercase RFC 1123 name.Dependencies
go.datum.net/computepoints at a merged commit onmain; no branch pins remain.Not covered
No envtest exercises a real admission request — the webhook's failure mode is a Pod coming up unattached, so that is the gap worth closing before this leaves draft. E2E not run.
Related
This is the "separate operator project"
galactichanded VPC and VPCAttachment to when it removed them (its architecture doc namesgo.datum.net/cloud, andnadpatch.AnnotateNADrequires the NAD to have been "created by the external VPC operator before the CNI is invoked"). Network services integration under datum-cloud/galactic#17.Realizes the data-plane end of datum-cloud/network-services-operator#164 and datum-cloud/compute#112: it writes the
vpc,attachmentRefandProgrammedfields those two leave for whoever programs the interface.Allocating VPC identity here is a step toward datum-cloud/galactic#197 — one authority for a VPC's identity and address space rather than the CNI deciding locally.
Built on #5, and targets
mainrather than that branch so CI runs at all.Deliberately out of scope: datum-cloud/galactic#332, #329 and #328 are data-plane concerns this controller does not touch. Note that the NAD is created per
NetworkInterfacerather than per VPC partly because two live workloads cannot currently share one attachment — the host interface name is derived from(vpc, vpcattachment)alone, soveth.Adddeletes and recreates an existing one whiletap.Addadopts it.🤖 Generated with Claude Code