🛠️ 계획된 개발 기능
Pod 생명주기 관리 API 구현 (생성 / 삭제) 및 Infra ↔ Spring WAS 간 연동 구조 구축
🛠 기능 구현 세부사항
1. Pod 생성 (POST /create-pod)
Spring은 username을 Infra로 전달하고, Infra는 내부적으로 GET /api/requests/config/{username}을 호출하여 사용자 정보(image, uid, gid, gpu_nodes, additional_ports 등)를 받아온 뒤 포트를 할당하고 Pod를 생성한다. 생성 완료 후 Infra는 user_info에 없던 신규 정보(node, pod_name, ports)만 Spring으로 반환한다.
- Request:
{ "username": "user1" }
- Response(201):
status, node, pod_name, ports[] (usage_purpose / internal_port / external_port)
- 실패 케이스:
username required / pod already exists / pod failed to start
2. Pod 삭제 (POST /delete-pod)
pod_name을 기반으로 해당 Pod를 삭제한다.
- Request:
{ "pod_name": "containerssh-user1-a82jd9" }
- Response:
{ "status": "deleted" }
- 실패 케이스:
invalid pod_name
3. Infra → Spring 사용자 정보 제공 (GET /api/requests/config/{username})
Infra가 Pod 생성 전에 호출하는 엔드포인트. Spring은 해당 username의 사용자 설정 정보를 반환한다.
- Response 필드:
username, image, uid, gid[], gpu_nodes[] (node_name / cpu_limit / memory_limit / num_gpu), additional_ports[] (internal_port / usage_purpose)
🛠 참고사항
- Infra가 Spring을 호출하는 구조(
/api/requests/config/{username})이므로, 해당 엔드포인트는 Infra 측 IP/인증 정책을 고려하여 보안 설정 필요
ports 배열의 usage_purpose는 ssh / jupyter / tensorboard / custom 중 하나이며, additional_ports를 통해 커스텀 포트도 지원
- Pod 마이그레이션(
POST /migrate) 명세는 별도 이슈로 분리 예정
📝 check-lists
🛠️ 계획된 개발 기능
Pod 생명주기 관리 API 구현 (생성 / 삭제) 및 Infra ↔ Spring WAS 간 연동 구조 구축
🛠 기능 구현 세부사항
1. Pod 생성 (
POST /create-pod)Spring은
username을 Infra로 전달하고, Infra는 내부적으로GET /api/requests/config/{username}을 호출하여 사용자 정보(image, uid, gid, gpu_nodes, additional_ports 등)를 받아온 뒤 포트를 할당하고 Pod를 생성한다. 생성 완료 후 Infra는 user_info에 없던 신규 정보(node, pod_name, ports)만 Spring으로 반환한다.{ "username": "user1" }status,node,pod_name,ports[](usage_purpose / internal_port / external_port)username required/pod already exists/pod failed to start2. Pod 삭제 (
POST /delete-pod)pod_name을 기반으로 해당 Pod를 삭제한다.{ "pod_name": "containerssh-user1-a82jd9" }{ "status": "deleted" }invalid pod_name3. Infra → Spring 사용자 정보 제공 (
GET /api/requests/config/{username})Infra가 Pod 생성 전에 호출하는 엔드포인트. Spring은 해당 username의 사용자 설정 정보를 반환한다.
username,image,uid,gid[],gpu_nodes[](node_name / cpu_limit / memory_limit / num_gpu),additional_ports[](internal_port / usage_purpose)🛠 참고사항
/api/requests/config/{username})이므로, 해당 엔드포인트는 Infra 측 IP/인증 정책을 고려하여 보안 설정 필요ports배열의usage_purpose는ssh/jupyter/tensorboard/custom중 하나이며,additional_ports를 통해 커스텀 포트도 지원POST /migrate) 명세는 별도 이슈로 분리 예정📝 check-lists