Skip to content

fix: name the cluster in the context a network context reconciles in - #397

Merged
scotwells merged 1 commit into
mainfrom
fix/networkcontext-cluster-in-context
Aug 21, 2026
Merged

fix: name the cluster in the context a network context reconciles in#397
scotwells merged 1 commit into
mainfrom
fix/networkcontext-cluster-in-context

Conversation

@scotwells

Copy link
Copy Markdown
Contributor

Every network context in the staging project control plane is stuck at ProjectUnresolved since #396, so no location gets a subnet and the chain behind it stays blocked.

Ready           False   ProjectUnresolved
IPAMAllocated   False   ProjectUnresolved
  namespace "default" carries no meta.datumapis.com/upstream-cluster-name label

resolveProjectOrCluster exists for exactly this case — a project's own control plane has no such label on its namespace, so the project is named by the cluster instead. It reads that name from the context. NetworkContextReconciler took req.ClusterName for its logger and never put it in the context, so the log line reported "cluster": "datum-cloud" while the fallback saw nothing and returned the original error.

NetworkReconciler already does this, one file over, which is why networks reconcile against project control planes today and contexts did not.

Verified on us-central-1-staging-lab: the context is in the project plane with the right labels and owner, and the reconcile runs — only the resolution fails.

Related

Fixes the project-plane path added in #396. Unblocks datum-cloud/compute#244, which waits on Prepared, and the VPC controller in datum-cloud/cloud that needs a subnet to give a location its address space.

resolveProjectOrCluster falls back to naming a project's own control plane
from the cluster the object was read from, because a project plane's
namespace carries no upstream-cluster-name label. It reads that name from
the context, and this reconciler never put it there — it took ClusterName
from the request for the logger only. So the log line said the cluster while
the fallback saw nothing, and every project-plane context failed to resolve.

NetworkReconciler already does this, which is why networks reconcile against
project control planes today and contexts did not.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@scotwells
scotwells requested a review from privateip August 21, 2026 16:31
@scotwells
scotwells marked this pull request as ready for review August 21, 2026 16:31
@scotwells
scotwells requested a review from savme August 21, 2026 16:37
@scotwells
scotwells enabled auto-merge August 21, 2026 16:43
@scotwells
scotwells merged commit f5516b7 into main Aug 21, 2026
12 of 13 checks passed
@scotwells
scotwells deleted the fix/networkcontext-cluster-in-context branch August 21, 2026 16:52
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