id: T057 name: k8shost Resource Management goal: Implement proper IP Address Management (IPAM) and tenant-aware scheduling for k8shost status: planned priority: P1 owner: peerB created: 2025-12-12 depends_on: [] blocks: [T039] context: | **Findings from T049 Audit:** - `k8shost/crates/k8shost-server/src/scheduler.rs`: `// TODO: Get list of active tenants from IAM or FlareDB` - `k8shost/crates/k8shost-server/src/services/service.rs`: `/// TODO: Implement proper IP allocation with IPAM` **Strategic Value:** - Essential for multi-tenant isolation and efficient resource utilization. - Required for Production Readiness (T039). acceptance: - k8shost scheduler is tenant-aware (can prioritize/constrain pods by tenant) - Pluggable IPAM system implemented for Service IP allocation - IPAM integrates with PrismNET for IP assignment and management - Integration tests for tenant scheduling and IPAM steps: - step: S1 name: IPAM System Design & Spec done: Define IPAM system architecture and API (integration with PrismNET) status: pending owner: peerA priority: P1 - step: S2 name: Service IP Allocation done: Implement IPAM integration for k8shost Service IPs status: pending owner: peerB priority: P1 - step: S3 name: Tenant-Aware Scheduler done: Modify scheduler to respect tenant constraints/priorities status: pending owner: peerB priority: P1 notes: | - Integrate with IAM to get tenant information. - Use CreditService for quota enforcement (already done in T045). evidence: [] notes: | Critical for multi-tenant and production deployments.