Enable to pass additional handler on pull for stargz-based remote snapshots #1431
Recently, we started a non-core subproject stargz-snapshotter aiming to speed up pull operation and we are seeing performance improvement on containerd.Client's Pull operation as the following (measured on Github Actions with Docker Hub. please also see README for more details).
We've implemented the fundamental features and stargz snapshotter passescritest with a patched version of CRI plugin. Now it's ready for being experimentally used on k8s-based workloads and seeking adoptabilities on it.
Stargz snapshotter is implemented as a standard proxy plugin but because it queries layer contents to the registry it requires containerd clients (including CRI plugin) to pass additional information (image ref and layer digest) for each pull operation through an image handler.
This commit enables to use stargz-based remote snapshots through CRI optionally, by integrating the image handler with CRI. You can test this patch with this node image, which is tested using critest.