Skip to content

shim: implement containerd Task.Update for in-place resource resize #12790

@a7i

Description

@a7i

Summary

The containerd v2 shim (pkg/shim/v1/runsc) currently implements TaskService.Update by returning errdefs.ErrNotImplemented. Kubernetes In-Place Pod Vertical Scaling (and any CRI client that calls UpdateContainerResources) therefore fails against runsc with errors such as failed to update resources: not implemented.

runsc already supports live cgroup updates via the OCI update command and runsc/container.Container.Update; only the shim RPC was missing.

Expected behavior

Task.Update should accept the same UpdateTaskRequest as containerd (including containerd 2.2): id, resources (google.protobuf.Any with JSON-encoded specs.LinuxResources, as used by github.com/containerd/containerd/pkg/process), and optional annotations. The shim should invoke runsc update --resources - with that JSON on stdin, analogous to github.com/containerd/go-runc Runc.Update.

Environment

  • containerd 2.2 (task API UpdateTaskRequest aligned with v1.6+ shim proto)
  • Kubernetes with in-place pod resize enabled

Additional context

Upstream draft PR will reference this issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions