Add a Prepared condition, and attachmentMode on the claim - #393
Merged
Conversation
NetworkInterface.status.consumerAnnotations carries the annotations the workload object needs for the data plane to deliver the interface, written by whoever realizes it and opaque to NSO. NetworkInterfaceClaim.spec.attachmentMode says whether the guest takes the NIC through a network namespace or a hypervisor, and is copied verbatim onto the interface. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This was referenced Aug 20, 2026
An opaque annotation map put an instruction in a status field and named a CNI on a published API in all but type. Delivery moves to a Pod admission webhook served by the data plane, so NSO's API carries no CNI vocabulary at all. Prepared reports that the data plane's pre-workload artifacts exist, which is the condition a consumer can safely gate workload creation on. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
scotwells
marked this pull request as ready for review
August 21, 2026 00:48
scotwells
enabled auto-merge
August 21, 2026 00:48
privateip
approved these changes
Aug 21, 2026
scotwells
added a commit
to datum-cloud/compute
that referenced
this pull request
Aug 21, 2026
…merged datum-cloud/network-services-operator#393 is merged, so the pin no longer targets an unmerged branch. The latest tag still predates the Prepared condition, so this stays a main pseudo-version until a release carries it. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
4 tasks
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.
Two additions that let a consumer attach an instance to a tenant VPC without knowing anything about networking. NSO carries both and interprets neither.
Prepared, on the claim and the interfaceThe data plane's pre-workload artifacts exist, so a workload consuming this interface can be created. Owned by whoever realizes the interface, seeded
Unknownand then left alone, exactly asProgrammedalready is.The distinction between the two conditions is the point, and getting it backwards deadlocks the platform.
Preparedbecomes true before any workload exists, which is what makes waiting on it safe.Programmedonly becomes true when the interface is attached, which happens while the workload's sandbox is being created — so a consumer that withholds the workload untilProgrammedis true waits for something its own waiting prevents. That is stated on both condition constants and in the enhancement, because the next person to gate on one of them will read one of the two.Readynow derives from Bound + Allocated + Prepared + Programmed. The existing survival test is extended to walk both conditions in order rather than a parallel test being added.NetworkInterfaceClaim.spec.attachmentModeNetnsorHypervisor, defaulting toNetns, copied verbatim ontoNetworkInterface.spec.attachmentModeat fulfillment. It says how the guest consumes the NIC — placed in a network namespace, as an ordinary container expects, or handed to a hypervisor as a device, as a virtual machine or microVM guest needs. It names no CNI, no Multus and no Linux device type, so it stays meaningful on a platform that has none of those. Immutable on the claim, because both the guest and the attachment are built against it.Nothing sets it to
Hypervisoryet. The first consumer is a VPC controller that takes the value from its own required configuration, standing in for a compute capability class that does not exist as an API yet.Withdrawn from an earlier revision of this PR
NetworkInterface.status.consumerAnnotationsis gone. It put an instruction in a status field, assumed the consumer was a Kubernetes Pod, and its opacity was fiction — the value wask8s.v1.cni.cncf.io/networksin plain sight on a published API, so every reader learned Multus exists whether or not their code was typed against it. A typed reference to the NAD was considered and rejected too: it compresses the same knowledge into a kind-to-mechanism switch, and once a mutating webhook exists the field has no external reader. Delivery now happens in a Pod admission webhook served by the VPC controller, and NSO's API carries no CNI vocabulary of any kind.Tests
make lintclean. All non-e2e packages pass.internal/controllerwas at the edge of Go's 10m per-package default before this work and is the reason to keep an eye on new envtest cases: it now runs in 537s, back inside the limit. Dropping the withdrawn field's test is what recovered the margin — this revision adds no new envtest case, extending an existing one instead.Related
🤖 Generated with Claude Code