Skip to content

feat(k8s): a gVisor RuntimeClass for pods that run untrusted code #5431

Closed

Description

@dan-petty

Problem or Motivation

The jobs of the Service run code that a model writes: the implement runner, the planner run Job (#4003), the in-cluster browser (#5356, Chromium with --no-sandbox) and crawl4ai. The boundary of each is the container of the pod. ADR 0018 accepts this boundary and says that a defect of the kernel of the host stays a risk. It also says that a gVisor RuntimeClass can close that risk later with no change of the tool.

The owner decided on 2026-11-13 to use gVisor (runsc). The cluster declares no RuntimeClass for runsc today. k3s finds some runtimes on the node by itself, but runsc is not one of them, so the cluster needs a RuntimeClass object in git.

Proposed Solution

  1. Add k8s/runtimeclass-gvisor.yaml: RuntimeClass gvisor (node.k8s.io/v1) with handler runsc and scheduling.nodeSelector sandbox.devops.io/gvisor: "true". The label uses the same project prefix as the llm.devops.io/* labels.
  2. Add the file to the resources of the root kustomization k8s/kustomization.yaml. Argo CD Application base syncs that path, and devops k8s deploy-stack applies it first on a cluster with no Argo CD.
  3. Pin the object with an invariant test in tests/invariants/test_k8s_argocd_apps.py, in the form of test_mattermost_operator_limitrange.
  4. Document the class in k8s/README.md: what it does, the node label, that the infra repository installs runsc and sets the label, how a pod uses it (runtimeClassName: gvisor), and its limits. Under runsc, the seccomp profile of the pod is not loaded, and the host filter of the gVisor Sentry applies in its place. A measurement must prove that the CPU and memory limits of the pod hold before a runner uses the class.
  5. Add a dated line to the Status History of ADR 0018, because its fact "the cluster declares no RuntimeClass for runsc" becomes wrong.

The infra repository installs a pinned runsc on one node and sets the label in its own pull request. No workload uses the class in this item. Before a node has the label, a pod of the class stays Pending and never runs on another node.

Acceptance Criteria

  • kubectl kustomize k8s renders one RuntimeClass gvisor with handler runsc and the node selector sandbox.devops.io/gvisor: "true", and no tolerations.
  • An invariant test pins the object and its place in the root kustomization. The test fails before the manifest exists.
  • k8s/README.md has a section for the class with the two limits above.
  • ADR 0018 gets one Status History line in a form of docs/adr/README.md, and its body-hash does not change.
  • No workload sets runtimeClassName: gvisor in this item.

Existing Tool Considered

gVisor (runsc, Apache-2.0) and the Kubernetes RuntimeClass API are the open tools. This item adds one manifest, one test and documents, and it builds no code. Cost: about 60k tokens to build and less than 5k tokens each year to keep; about 1 hour of elapsed time. The kubernetes-sigs/agent-sandbox controller is the other option of ADR 0018, and #2695 owns its measurement.

Related

Source: #2695

Activity

  1. added
    source/agent
    on Nov 13, 2026
  2. added
    type/feature
    scope/k8s
    status/new
    value/high
    effort/low
    on Nov 13, 2026
  3. dan-petty commented on Nov 13, 2026

    @dan-petty
    OwnerAuthor
  4. added
    priority/p2-medium
    owner/agent
    status/in-progress
    status/in-review
    and removed
    status/new
    status/in-progress
    on Nov 13, 2026
  5. removed
    status/in-review
    owner/agent
    on Nov 13, 2026
  6. devops-cli-service commented on Nov 13, 2026

    @devops-cli-service
    Contributor

    Live since 2026-11-13 18:17 UTC

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    effort/lowpriority/p2-mediumscope/k8ssource/agenttype/featurevalue/high

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions