Skip to content

[Feature Request] Route auto-resume through CubeAPI for policy and quota enforcement #1326

Description

@han2ni3bal-pixel

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

  1. Does the community agree that auto-resume should pass through CubeAPI?
  2. Would making the lifecycle manager depend on CubeAPI introduce any concerns?
  3. Would a policy admission hook inside the lifecycle manager be preferable?

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions