Problem
When a project is deleted, the compute resources that were federated into the control plane on its behalf are left behind. We found orphaned Instances and WorkloadDeployments in staging belonging to projects that no longer exist, and they never get cleaned up.
The most visible symptom is noise that never stops: the instance projector keeps trying to reconcile an orphaned Instance, can't resolve the deleted project's cluster, and logs an error on every attempt — forever, at a backoff-widening cadence. Because these reconciles fail, they inflate the controller error metrics and add steady error-log volume that can bury or mask genuine projection failures. As projects are created and torn down over time (e.g. every e2e run), the orphaned objects accumulate with no bound.
Impact
- Never-ending error churn from a permanently unresolvable reconcile — inflates error metrics and log volume, and can mask real failures. This also risks tripping controller health/alerting on what is actually dead data.
- Leaked resources grow unbounded as projects churn; nothing reclaims them.
- Confusing operator signal — an error that looks like a live problem but corresponds to a project that's already gone.
What we found in staging
Audited every federated compute resource against the live project list:
- 1 orphaned Instance — belonged to a deleted project; it had no owner and no finalizer, drove no running workload, and was the source of the perpetual projector error. Removed manually to stop the noise.
- 2 orphaned WorkloadDeployments — federated copies for two other deleted projects, still present.
(There is also a much larger set of leftover namespaces on the federation plane for deleted projects, but those are managed by the networking/federation layer, not compute, and are out of scope here.)
Root cause
Federated compute resources don't get reclaimed when their project goes away. The write-back and federated copies carry no owner reference to anything that is itself deleted when the project is removed, so nothing cascades — and the project's cluster deregisters, so the projector can never resolve it again. On top of that, the projector treats an unresolvable project cluster as a hard, retryable error rather than recognizing it as terminal, which turns a dead object into an infinite error loop.
Proposed fixes (two layers)
- Stop the noise (small, low-risk). When the projector can't resolve a project's cluster, handle it gracefully instead of erroring on every attempt — the federator already does exactly this for the equivalent case. This also removes the harmless but noisy errors during the normal startup window before projects are engaged.
- Reclaim the orphans (root cause). Garbage-collect federated Instances and WorkloadDeployments when their project (and its cluster) is deleted, so leftover objects don't accumulate.
Acceptance criteria
- Deleting a project leaves no orphaned Instances or WorkloadDeployments behind on the federation plane.
- A project whose cluster can't be resolved no longer produces perpetual reconcile errors or error-metric inflation.
Problem
When a project is deleted, the compute resources that were federated into the control plane on its behalf are left behind. We found orphaned Instances and WorkloadDeployments in staging belonging to projects that no longer exist, and they never get cleaned up.
The most visible symptom is noise that never stops: the instance projector keeps trying to reconcile an orphaned Instance, can't resolve the deleted project's cluster, and logs an error on every attempt — forever, at a backoff-widening cadence. Because these reconciles fail, they inflate the controller error metrics and add steady error-log volume that can bury or mask genuine projection failures. As projects are created and torn down over time (e.g. every e2e run), the orphaned objects accumulate with no bound.
Impact
What we found in staging
Audited every federated compute resource against the live project list:
(There is also a much larger set of leftover namespaces on the federation plane for deleted projects, but those are managed by the networking/federation layer, not compute, and are out of scope here.)
Root cause
Federated compute resources don't get reclaimed when their project goes away. The write-back and federated copies carry no owner reference to anything that is itself deleted when the project is removed, so nothing cascades — and the project's cluster deregisters, so the projector can never resolve it again. On top of that, the projector treats an unresolvable project cluster as a hard, retryable error rather than recognizing it as terminal, which turns a dead object into an infinite error loop.
Proposed fixes (two layers)
Acceptance criteria