Fix K8s pod creation: use correct V1Pod format
All checks were successful
Build and Push Backend / build (push) Successful in 4s
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>
This commit is contained in:
@@ -43,13 +43,10 @@ export function getK8sClient(): k8s.CoreV1Api {
|
||||
/**
|
||||
* Create pod spec for agent
|
||||
*/
|
||||
export function createAgentPodSpec(podName: string, userId: string) {
|
||||
export function createAgentPodSpec(podName: string, userId: string): k8s.V1Pod {
|
||||
return {
|
||||
apiVersion: 'v1',
|
||||
kind: 'Pod',
|
||||
metadata: {
|
||||
name: podName,
|
||||
namespace: 'agents',
|
||||
labels: {
|
||||
app: 'claude-agent',
|
||||
userId: userId,
|
||||
|
||||
Reference in New Issue
Block a user