volcano-sh / volcano-sh/agentcube
CodeInterpreter controller can delete unowned SandboxTemplate resources
@avinxshKD is already working on this.
Since Aug 2, 2026.
- Dominant language
- Go
- Stars
- 167
- Forks
- 88
- Avg merge
- 44m
- Merged PRs (30d)
- 1
Description
What happened:
The CodeInterpreter controller assumes that any SandboxTemplate or SandboxWarmPool with the same namespace/name belongs to the CodeInterpreter.
Existing resources are updated without checking their owner reference. When warmPoolSize is zero, the same-named resources are deleted unconditionally. This can overwrite or delete resources created by another user or controller.
What you expected to happen:
The controller should only update or delete resources controlled by that CodeInterpreter. A name collision with an unowned resource should fail reconciliation and report a condition/event.
How to reproduce it (as minimally and precisely as possible):
-
Create a standalone
SandboxTemplatenamedtest. -
Create a
CodeInterpreternamedtestin the same namespace with a valid template andwarmPoolSize: 0. -
Wait for the CodeInterpreter controller to reconcile.
-
Run:
kubectl get sandboxtemplate test
The original template is deleted.
The update path can also be reproduced with warmPoolSize: 1; the existing template spec is overwritten while its ownership is never verified.
Anything else we need to know?:
SetControllerReference is only called when creating a new child. The existing-resource update and delete paths do not check metav1.IsControlledBy or the controller UID.
Environment:
- agentcube version: main (
0704bb9) - Kubernetes version: not version-specific
- Others: agent-sandbox v0.4.6
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.