Status: Complete (code written, not yet deployed) Date: 2026-03-17
Batched implementation of all controller and Helm infrastructure needed to launch publisher jobs in K8s with Playwright MCP, shared memory, network isolation, and new secrets.
buildCommand()File: infra/agent-controller/pkg/controller/controller.go
buildCommand() now branches on task.Spec.Agent == "publisher":
playwright server alongside
discord + google-news. Invokes apps/blog/bin/run-publisher.sh (TASK-003
entrypoint script) instead of claude directly. No --allowedTools
passed — the entrypoint script handles Claude invocation internally.claude invocation.Publisher MCP config adds:
"playwright": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@playwright/mcp@latest", "--headless"]
}
File: infra/agent-controller/pkg/controller/controller.go
Publisher-specific pod changes:
| Feature | Implementation |
|---|---|
/dev/shm |
emptyDir volume, medium: Memory, sizeLimit: 1Gi |
| Zombie reaping | shareProcessNamespace: true on pod spec |
| UID | Init container chowns to 1001:1001 (Playwright's pwuser); non-publisher stays at 1000 |
| Security context | allowPrivilegeEscalation: false, capabilities: drop: [ALL] (applied to all agents) |
Files: helm/templates/secret.yaml, helm/values.yaml
New secret keys (lookup-preserve pattern):
CLAUDE_CODE_OAUTH_TOKEN — Claude Max OAuth tokenGITHUB_TOKEN — PAT for gh pr createDISCORD_WEBHOOK_URL — webhook for publisher notificationsRuntime image tag bumped from 0.2 to 0.3 in values.yaml.
File: helm/templates/networkpolicy.yaml (new)
Non-RFC1918 egress policy (OpenClaw pattern):
agents.kyle.pericak.com/agent label (Exists operator)0.0.0.0/0 except 10.0.0.0/8,
172.16.0.0/12, 192.168.0.0/16File: config/samples/publisher-manual.yaml (new)
Minimal AgentTask: agent: publisher, trigger: manual, readOnly: false.
Placeholder prompt for Kyle to replace per run. No allowedTools — the
entrypoint script manages Claude invocation.
| Check | Result |
|---|---|
go build ./... |
Clean |
go test ./... |
No test files (pre-existing) |
helm template |
All templates render correctly |
helm lint |
Passed (advisory: missing icon) |
| Non-publisher unchanged | Default buildCommand() path untouched |
ai-agent-runtime:0.3 and agent-controller:0.6helm upgrade deployment