Background
We are designing an external Policy Gateway to enforce per-tenant limits, initially:
- Maximum total sandboxes
- Maximum running sandboxes
Create and user-initiated resume requests can be admitted through CubeAPI. However, the current auto-resume path is:
CubeProxy -> cube-lifecycle-manager -> CubeMaster
This bypasses CubeAPI and any policy or quota checks implemented there. As a result, a paused sandbox may auto-resume even when the tenant has already reached its running-sandbox limit. Reconciliation can correct the counter afterward, but cannot prevent the quota violation.
Proposal
Route auto-resume through an internal CubeAPI endpoint:
CubeProxy -> cube-lifecycle-manager -> CubeAPI -> Policy Gateway -> CubeMaster
The lifecycle manager would continue to own resume locking and request coalescing. CubeAPI would perform policy admission before calling CubeMaster, then commit or release the quota reservation based on the result.
This keeps CubeMaster unaware of tenants and quotas.
Questions
- Does the community agree that auto-resume should pass through CubeAPI?
- Would making the lifecycle manager depend on CubeAPI introduce any concerns?
- Would a policy admission hook inside the lifecycle manager be preferable?
Background
We are designing an external Policy Gateway to enforce per-tenant limits, initially:
Create and user-initiated resume requests can be admitted through CubeAPI. However, the current auto-resume path is:
CubeProxy -> cube-lifecycle-manager -> CubeMaster
This bypasses CubeAPI and any policy or quota checks implemented there. As a result, a paused sandbox may auto-resume even when the tenant has already reached its running-sandbox limit. Reconciliation can correct the counter afterward, but cannot prevent the quota violation.
Proposal
Route auto-resume through an internal CubeAPI endpoint:
CubeProxy -> cube-lifecycle-manager -> CubeAPI -> Policy Gateway -> CubeMaster
The lifecycle manager would continue to own resume locking and request coalescing. CubeAPI would perform policy admission before calling CubeMaster, then commit or release the quota reservation based on the result.
This keeps CubeMaster unaware of tenants and quotas.
Questions