Skip to content
This repository was archived by the owner on May 12, 2021. It is now read-only.
This repository was archived by the owner on May 12, 2021. It is now read-only.

Implement containerd shim v2 API for Kata Containers #485

@gnawux

Description

@gnawux

In the arch committee meeting last week, Michael Crosby introduced the containerd shim API v2. After the meeting, read related documents, patches, and discussed with @bergwolf @lifupan and related folks. And I think we could begin to implement the kata shim for containerd v2 API now.

Current kata & containerd working pattern

Right now, containerd and runtime work in the following pattern:

containerd-kata-shimv1

Whenever containerd tries to create a container,

  • It creates a containerd-shim
  • The containerd-shim call runtime cli -- the cli is specified by the runtime=kata flag, and the cli should be compatible with runc
  • The containerd-shim served at the address specified by containerd, and feedback events to containerd’s listening address

Though the containerd-shim designed to be an replaceable component

  • There still has to be one containerd shim per container (or process?)

Benefits from shim v2 API

With the proposed shim v2 API, the most significant change is

  • The shim will write the serving address back to containerd through stdout, instead of specified by containerd

As a result

  • We may replace the containerd-shim with a customized shim, and don’t need to implement a runc compatible CLI for containerd-shim.
  • We may use a single shim for a couple of containers, such as one shim per pod

Then the architecture may change to the follows:

containerd-shimv2-per-pod

  • One shim for containerd per pod
  • No proxies and kata-shim processes any more

And in v2 API, stats function is moved to shim, which makes the shim more self-contained.

Where we start

Metadata

Metadata

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