Skip to content

feat(server): add Pool CRUD API and Kubernetes CRD service#357

Merged
Pangjiping merged 2 commits intoalibaba:mainfrom
wangdengshan:feat/server-pool-crud-api
Mar 24, 2026
Merged

feat(server): add Pool CRUD API and Kubernetes CRD service#357
Pangjiping merged 2 commits intoalibaba:mainfrom
wangdengshan:feat/server-pool-crud-api

Conversation

@wangdengshan
Copy link
Contributor

Summary

  • Add Pool CRUD API endpoints and Kubernetes CRD-backed service for managing pre-warmed sandbox pools
  • Add Pool Pydantic schemas: PoolCapacitySpec, PoolStatus, CreatePoolRequest, UpdatePoolRequest, PoolResponse, ListPoolsResponse
  • Add PoolService backed by Kubernetes CustomObjectsApi (CRUD on sandbox.opensandbox.io/v1alpha1 SandboxPool resources)
  • Add FastAPI router: POST/GET /pools, GET/PUT/DELETE /pools/{pool_name}
  • Return HTTP 501 for non-Kubernetes runtimes
  • Add error code constants: K8S_POOL_NOT_FOUND, K8S_POOL_ALREADY_EXISTS, K8S_POOL_API_ERROR, K8S_POOL_NOT_SUPPORTED

Testing

  • Unit tests
  • Integration tests
  • 63 tests total (29 unit + 34 integration)

Breaking Changes

  • None

Checklist

  • Linked Issue or clearly described motivation
  • Added/updated docs (if needed)
  • Added/updated tests (if needed)
  • Security impact considered
  • Backward compatibility considered

- Add Pool Pydantic schemas: PoolCapacitySpec, PoolStatus, CreatePoolRequest,
  UpdatePoolRequest, PoolResponse, ListPoolsResponse
- Add PoolService backed by Kubernetes CustomObjectsApi (CRUD on
  sandbox.opensandbox.io/v1alpha1 SandboxPool resources)
- Add FastAPI router: POST/GET /pools, GET/PUT/DELETE /pools/{pool_name}
- Return HTTP 501 for non-Kubernetes runtimes
- Add error code constants: K8S_POOL_NOT_FOUND, K8S_POOL_ALREADY_EXISTS,
  K8S_POOL_API_ERROR, K8S_POOL_NOT_SUPPORTED
- Add 63 tests (29 unit + 34 integration)
@Pangjiping Pangjiping requested a review from ninan-nn as a code owner March 24, 2026 04:18
@Pangjiping
Copy link
Collaborator

Thanks for your submission! We are currently evaluating and working on this.

I will merge this PR after reviewing it, and then implement complete pool CRUD functionality on top of it.

@Pangjiping Pangjiping added feature New feature or request component/server labels Mar 24, 2026
Copy link
Collaborator

@Pangjiping Pangjiping left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Pangjiping Pangjiping merged commit 23ab444 into alibaba:main Mar 24, 2026
7 of 10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component/server feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants