Commit Graph

3 Commits

Author SHA1 Message Date
Hector Ros
e0c6884a7b Fix K8s API calls: use param object format
All checks were successful
Build and Push Backend / build (push) Successful in 5s
The @kubernetes/client-node API expects parameters as an object:
{ namespace: 'ns', body: pod } instead of positional params.

Co-Authored-By: Claude Sonnet 4.5 (1M context) <noreply@anthropic.com>
2026-01-20 17:48:56 +01:00
Hector Ros
6f1c51bfd8 Fix K8s pod creation: use correct V1Pod format
All checks were successful
Build and Push Backend / build (push) Successful in 4s
- Remove apiVersion and kind from pod spec (not needed for client-node)
- Remove namespace from metadata (passed as parameter)
- Use proper V1Pod type from @kubernetes/client-node

Co-Authored-By: Claude Sonnet 4.5 (1M context) <noreply@anthropic.com>
2026-01-20 17:37:38 +01:00
Hector Ros
f104425b91 Implement Kubernetes pod management for agents
All checks were successful
Build and Push Backend / build (push) Successful in 5s
- Add @kubernetes/client-node dependency
- Create K8s client utilities in src/lib/k8s.ts
- Implement createAgentPod and deleteAgentPod functions
- Update launchAgent to actually create pods in K8s
- Update unregisterAgent to delete pods from K8s
- Initialize K8s client on backend startup
- Add rollback logic if pod creation fails

Co-Authored-By: Claude Sonnet 4.5 (1M context) <noreply@anthropic.com>
2026-01-20 17:34:10 +01:00