Add runtimeClassName to PodOverrides

TE
10h ago
+462-3

What type of PR is this?

/kind api

What this PR does / why we need it:

Adds runtimeClassName to PodOverrides, so agent pods can run under a sandboxed RuntimeClass such as gVisor or Kata Containers.

Agents run unattended with a shell and act on untrusted input: PR bodies, issue comments, and upstream changelogs. A sandboxed runtime keeps a container escape from reaching the node. There's no way to set this today short of a mutating webhook.

  • Where it applies: Task Jobs and Session pods (both built by JobBuilder) and WorkerPool StatefulSets.
  • WorkerPool drift: podTemplateSpecEqual now compares the field, so changing it on a running pool rolls the StatefulSet.
  • API: optional *string, v1alpha2 only, as CONTRIBUTING.md asks. Nothing is set unless a user opts in.

Which issue(s) this PR is related to:

N/A

Special notes for your reviewer:

I ran the stock claude-code agent image under gVisor (runsc) on a k3s cluster: clone, gh, and the agent CLI all work. The only noticeable cost is process start, ~2.3ms vs ~0.5ms under runc.

make test passes for the changed packages. internal/sessionruntime and internal/consoleserver fail the same way on clean main in my sandboxed environment, so I left them to CI. From make test-integration I ran only the new empty-runtimeClassName spec, under envtest.

Does this PR introduce a user-facing change?

Add `podOverrides.runtimeClassName` so Task, Session, and WorkerPool agent pods can run under a sandboxed RuntimeClass such as gVisor or Kata Containers.

🤖 Generated with Claude Code

https://claude.ai/code/session_01MqFY9Nqj6Sq83zLX8iW4H3