Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support CRI v1 API #1011

Merged
merged 1 commit into from
Dec 6, 2022
Merged

Support CRI v1 API #1011

merged 1 commit into from
Dec 6, 2022

Conversation

ktock
Copy link
Member

@ktock ktock commented Nov 29, 2022

Fixes: #1007 #1006 #1005

This commit adds support for CRI v1 API for CRI proxy. We still support CRI v1alpha API because containerd supports it. We'll drop that API once containerd drops that API.

@ktock
Copy link
Member Author

ktock commented Nov 29, 2022

https://github.com/containerd/stargz-snapshotter/actions/runs/3572035809/jobs/6004477580#step:7:1443

github.com/k3s-io/k3s/pkg/containerd imports
	github.com/containerd/stargz-snapshotter/service/plugin imports
	github.com/containerd/containerd/third_party/k8s.io/cri-api/pkg/apis/runtime/v1alpha2: module github.com/containerd/containerd@latest found (v1.6.10, replaced by github.com/k3s-io/[email protected]), but does not contain package 

It seems that we need to maintain or own CRI API fork.

@ktock
Copy link
Member Author

ktock commented Nov 29, 2022

Added github.com/containerd/stargz-snapshotter/third_party/k8s.io/cri-api/pkg/apis/runtime/v1alpha2 as a fork of CRI API.

@ktock ktock marked this pull request as draft November 29, 2022 08:03
@ktock ktock closed this Nov 29, 2022
@ktock ktock reopened this Nov 29, 2022
@ktock ktock marked this pull request as ready for review November 29, 2022 08:06
@ktock ktock force-pushed the cri-v1 branch 4 times, most recently from 03fc518 to af313f1 Compare November 30, 2022 02:49
This commit adds support for CRI v1 API for CRI proxy.
We still support CRI v1alpha API because containerd supports it.
We'll drop that API once containerd drops that API.

Signed-off-by: Kohei Tokunaga <[email protected]>
@ktock
Copy link
Member Author

ktock commented Nov 30, 2022

Here we introduce github.com/containerd/stargz-snapshotter/service/pluginforked.

Both of github.com/containerd/stargz-snapshotter/service/pluginforked and the current github.com/containerd/stargz-snapshotter/service/plugin register our stargz snapshotter plugin to the containerd plugin system (e.g. used by k3s). So most of user can use github.com/containerd/stargz-snapshotter/service/plugin and ignore github.com/containerd/stargz-snapshotter/service/pluginforked.

github.com/containerd/stargz-snapshotter/service/plugin depends on containerd newer than 234bf990dca4e81e89f549448aa6b555286eaa7a which contains CRI v1alpha API fork. So if the user imports stargz-snapshotter to the tool that imports older version of containerd, the user can't build it. In this case, the user needs to use github.com/containerd/stargz-snapshotter/service/pluginforked instead. This plugin contains our forked CRI v1alpha API.

The latest k3s (953c7699b413f421a9543d45d282a1d3ce8e3598) doesn't imports the recent version of containerd so they need to use github.com/containerd/stargz-snapshotter/service/pluginforked until upgrading containerd. Our k3s integration test uses github.com/containerd/stargz-snapshotter/service/pluginforked as well.

Once the user upgrade containerd to newer than 234bf990dca4e81e89f549448aa6b555286eaa7a, the uesr can't use github.com/containerd/stargz-snapshotter/service/pluginforked and protobuf code fails with the error e.g. proto: duplicate enum registered: runtime.v1alpha2.Protocol. In this case,github.com/containerd/stargz-snapshotter/service/plugin need to be used.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Organizar iPhone y ipd Smartphone Web Package verciono code:432418133:verconName:88.0.4324.181
2 participants