26 lines
892 B
Markdown
26 lines
892 B
Markdown
|
|
# Task ID: 140
|
||
|
|
|
||
|
|
**Title:** Extend ContainerSpec for ephemeral pods
|
||
|
|
|
||
|
|
**Status:** pending
|
||
|
|
|
||
|
|
**Dependencies:** None
|
||
|
|
|
||
|
|
**Priority:** high
|
||
|
|
|
||
|
|
**Description:** Add restartPolicy, workdir, volumes, and initContainers to ContainerSpec interface
|
||
|
|
|
||
|
|
**Details:**
|
||
|
|
|
||
|
|
In src/mcpd/src/services/orchestrator.ts:
|
||
|
|
1. Add to ContainerSpec interface:
|
||
|
|
- restartPolicy?: 'Always' | 'Never' | 'OnFailure'
|
||
|
|
- workdir?: string
|
||
|
|
- volumes?: Array<{ name: string; mountPath: string; kind: 'emptyDir' }>
|
||
|
|
- initContainers?: Array<{ name: string; image: string; command: string[]; env?: Record<string, string>; volumeMounts?: Array<{ name: string; mountPath: string }> }>
|
||
|
|
2. These enable ephemeral session pods with workspace volumes and repo-clone init containers
|
||
|
|
|
||
|
|
**Test Strategy:**
|
||
|
|
|
||
|
|
Type tests: verify ContainerSpec accepts all new optional fields, verify existing code still compiles without providing new fields.
|