Skip to content

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

Open
wangdengshan wants to merge 1 commit intoalibaba:mainfrom
wangdengshan:feat/server-pool-crud-api
Open

feat(server): add Pool CRUD API and Kubernetes CRD service#357
wangdengshan wants to merge 1 commit 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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant