set containerd.io/image.remote.ref label to images and snapshots#1569
Closed
AkihiroSuda wants to merge 1 commit intocontainerd:masterfrom
Closed
set containerd.io/image.remote.ref label to images and snapshots#1569AkihiroSuda wants to merge 1 commit intocontainerd:masterfrom
containerd.io/image.remote.ref label to images and snapshots#1569AkihiroSuda wants to merge 1 commit intocontainerd:masterfrom
Conversation
Signed-off-by: Akihiro Suda <[email protected]>
Codecov Report
@@ Coverage Diff @@
## master #1569 +/- ##
=======================================
Coverage 42.36% 42.36%
=======================================
Files 24 24
Lines 3368 3368
=======================================
Hits 1427 1427
Misses 1612 1612
Partials 329 329Continue to review full report at Codecov.
|
Member
|
What if the snapshot are used with multiple different references? How would that work? |
Member
Author
|
closing per personal communication |
mauriciovasquezbernal
pushed a commit
to kinvolk/containerd
that referenced
this pull request
Nov 13, 2020
The default values of masked and readonly paths are defined in populateDefaultUnixSpec, and are used when a sandbox is created. It is not, however, used for new containers. If a container definition does not contain a security context specifying masked/readonly paths, a container created from it does not have masked and readonly paths. This patch applies the default values to masked and readonly paths of a new container, when any specific values are not specified. Fixes containerd#1569 Signed-off-by: Yohei Ueda <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Signed-off-by: Akihiro Suda [email protected]
This commit sets
containerd.io/image.remote.reflabel to images and corresponding snapshots.e.g.
docker.io/library/alpine:latest.(Note that "image reference" differs from "image name": https://godoc.org/github.com/containerd/containerd/remotes#Resolver)
Future version MAY set
containerd.io/image.remote.resolverexplicitly as well, although we haven't decided any convention for resolver identifier string.Note that we won't set any registry credential as labels.
Usecase: continuity snapshotter plugin with lazy-pull feature
I'm working on a project that uses continuity manifest (== info for
getdents(2)andstat(2)) as an image layer, instead of legacy tar balls.On initial
client.Pull()andimage.Unpack(), only the continuity manifest is pulled and unpacked.This enables running containers without pulling the whole rootfs blobs, and lazily pulling blobs on demand.
@stevvooe suggested me to implement this as a containerd snapshotter (and differ and contentstore) plugin, and I found that such a plugin would need to get remote reference information (
containerd.io/image.remote.ref) from the client.Note that the plugin can resolve the registry credential by itself in its own way, probably via plugin-specific entries in
/etc/containerd/config.toml:cc @stevvooe @dmcgowan @tonistiigi