Skip to content

Let a data plane own Programmed on network interfaces - #391

Merged
scotwells merged 1 commit into
mainfrom
feat/external-programmed-writer
Aug 21, 2026
Merged

Let a data plane own Programmed on network interfaces#391
scotwells merged 1 commit into
mainfrom
feat/external-programmed-writer

Conversation

@scotwells

@scotwells scotwells commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

NSO seeds Programmed=Unknown on a NetworkInterface and its claim and then leaves it alone, because the component that realizes the interface owns it. A VPC attachment controller is about to become that component. This confirms NSO will not fight it, and corrects the enhancement's account of how an attachment comes into being.

NSO does not overwrite an external writer, on any path. seedProgrammed and its NetworkInterface equivalent both write only when the condition is absent, and every other write is field-scoped on a freshly read object — nothing assigns status wholesale, and nothing touches status.vpc or status.attachmentRef. That holds through a requeue, a rejection (which demotes only Ready, and Bound/Allocated for a claim that never bound), and a release-and-rebind under reclaimPolicy: Retain. No fix was needed; two regression tests now lock the behaviour in so a future status write cannot quietly clobber the data plane's report.

Docs. "Reaching the data plane" said the agent on the node creates the VPCAttachment from the interface. That direction cannot work: the CNI configuration the attachment produces has to exist before the pod's sandbox is created, so an attachment that only appears as a result of the attach is too late to cause one. The section and its diagram now describe the realized design — the infrastructure provider writes the spec before the pod, the node reports status — and state explicitly which three status fields NSO never writes and never clears.

RBAC. Added networkinterface-dataplane-role, alongside the per-CRD helper roles this repo already ships: read on interfaces and claims, status write on both. The definition belongs here because the resources do; binding it to a specific service account is a deployment concern and stays in infra.

One observation left alone, worth a decision elsewhere: under Retain, an interface released back to Available keeps whatever Programmed the data plane last reported, even though nothing is attached. Clearing it would make NSO a writer of a condition it deliberately does not own, so the stale value is the data plane's to correct.

make lint clean, internal/controller envtest suite green.

Related

Programmed is the condition #164's contract leaves to whoever realizes the interface. This confirms NSO will not overwrite an external writer, and locks that in with tests. The first writer is the VPC controller in datum-cloud/cloud#6.

datum-cloud/compute#112 is the consumer end: the address and its conditions surface on Instance.status.

🤖 Generated with Claude Code

privateip
privateip previously approved these changes Aug 21, 2026
NSO seeds Programmed=Unknown and leaves it to whoever realizes the
interface. Lock that in with regression tests covering the requeue,
rejection and Retain-rebind paths, add the ClusterRole a data plane
needs to report it, and correct the enhancement's account of which
component creates a VPCAttachment.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@scotwells
scotwells merged commit aceb24b into main Aug 21, 2026
11 of 13 checks passed
@scotwells
scotwells deleted the feat/external-programmed-writer branch August 21, 2026 01:42
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