Merge pull request #4570 from ktock/vendor-cri
vendor: update containerd/cri 210a86ca5b
This commit is contained in:
commit
d6774b6392
@ -58,7 +58,7 @@ gotest.tools/v3 v3.0.2
|
||||
github.com/cilium/ebpf 1c8d4c9ef7759622653a1d319284a44652333b28
|
||||
|
||||
# cri dependencies
|
||||
github.com/containerd/cri 35e623e6bf7512e8c82b8ac6052cb1d720189f28 # master
|
||||
github.com/containerd/cri 210a86ca5bf6c8ca5f2553272d72c774b21fdec2 # master
|
||||
github.com/davecgh/go-spew v1.1.1
|
||||
github.com/docker/docker 4634ce647cf2ce2c6031129ccd109e557244986f
|
||||
github.com/docker/spdystream 449fdfce4d962303d702fec724ef0ad181c92528
|
||||
|
9
vendor/github.com/containerd/cri/README.md
generated
vendored
9
vendor/github.com/containerd/cri/README.md
generated
vendored
@ -151,11 +151,10 @@ For async communication and long running discussions please use issues and pull
|
||||
requests on this github repo. This will be the best place to discuss design and
|
||||
implementation.
|
||||
|
||||
For sync communication we have a community slack with a #containerd channel that
|
||||
everyone is welcome to join and chat about development.
|
||||
|
||||
**Slack:** Catch us in the #containerd and #containerd-dev channels on dockercommunity.slack.com.
|
||||
[Click here for an invite to docker community slack.](https://dockr.ly/slack)
|
||||
For sync communication catch us in the `#containerd` and `#containerd-dev` slack
|
||||
channels on Cloud Native Computing Foundation's (CNCF) slack -
|
||||
`cloud-native.slack.com`. Everyone is welcome to join and chat.
|
||||
[Get Invite to CNCF slack.](https://slack.cncf.io)
|
||||
|
||||
## Other Communications
|
||||
As this project is tightly coupled to CRI and CRI-Tools and they are Kubernetes
|
||||
|
36
vendor/github.com/containerd/cri/pkg/server/image_pull.go
generated
vendored
36
vendor/github.com/containerd/cri/pkg/server/image_pull.go
generated
vendored
@ -31,6 +31,7 @@ import (
|
||||
"github.com/containerd/containerd"
|
||||
"github.com/containerd/containerd/errdefs"
|
||||
containerdimages "github.com/containerd/containerd/images"
|
||||
"github.com/containerd/containerd/labels"
|
||||
"github.com/containerd/containerd/log"
|
||||
distribution "github.com/containerd/containerd/reference/docker"
|
||||
"github.com/containerd/containerd/remotes/docker"
|
||||
@ -460,7 +461,7 @@ const (
|
||||
targetDigestLabel = "containerd.io/snapshot/cri.layer-digest"
|
||||
// targetImageLayersLabel is a label which contains layer digests contained in
|
||||
// the target image and will be passed to snapshotters for preparing layers in
|
||||
// parallel.
|
||||
// parallel. Skipping some layers is allowed and only affects performance.
|
||||
targetImageLayersLabel = "containerd.io/snapshot/cri.image-layers"
|
||||
)
|
||||
|
||||
@ -478,15 +479,6 @@ func appendInfoHandlerWrapper(ref string) func(f containerdimages.Handler) conta
|
||||
}
|
||||
switch desc.MediaType {
|
||||
case imagespec.MediaTypeImageManifest, containerdimages.MediaTypeDockerSchema2Manifest:
|
||||
var layers string
|
||||
for _, c := range children {
|
||||
if containerdimages.IsLayerType(c.MediaType) {
|
||||
layers += fmt.Sprintf("%s,", c.Digest.String())
|
||||
}
|
||||
}
|
||||
if len(layers) >= 1 {
|
||||
layers = layers[:len(layers)-1]
|
||||
}
|
||||
for i := range children {
|
||||
c := &children[i]
|
||||
if containerdimages.IsLayerType(c.MediaType) {
|
||||
@ -495,7 +487,7 @@ func appendInfoHandlerWrapper(ref string) func(f containerdimages.Handler) conta
|
||||
}
|
||||
c.Annotations[targetRefLabel] = ref
|
||||
c.Annotations[targetDigestLabel] = c.Digest.String()
|
||||
c.Annotations[targetImageLayersLabel] = layers
|
||||
c.Annotations[targetImageLayersLabel] = getLayers(ctx, targetImageLayersLabel, children[i:], labels.Validate)
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -503,3 +495,25 @@ func appendInfoHandlerWrapper(ref string) func(f containerdimages.Handler) conta
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
// getLayers returns comma-separated digests based on the passed list of
|
||||
// descriptors. The returned list contains as many digests as possible as well
|
||||
// as meets the label validation.
|
||||
func getLayers(ctx context.Context, key string, descs []imagespec.Descriptor, validate func(k, v string) error) (layers string) {
|
||||
var item string
|
||||
for _, l := range descs {
|
||||
if containerdimages.IsLayerType(l.MediaType) {
|
||||
item = l.Digest.String()
|
||||
if layers != "" {
|
||||
item = "," + item
|
||||
}
|
||||
// This avoids the label hits the size limitation.
|
||||
if err := validate(key, layers+item); err != nil {
|
||||
log.G(ctx).WithError(err).WithField("label", key).Debugf("%q is omitted in the layers list", l.Digest.String())
|
||||
break
|
||||
}
|
||||
layers += item
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
2
vendor/github.com/containerd/cri/vendor.conf
generated
vendored
2
vendor/github.com/containerd/cri/vendor.conf
generated
vendored
@ -2,7 +2,7 @@
|
||||
github.com/docker/docker 4634ce647cf2ce2c6031129ccd109e557244986f
|
||||
github.com/opencontainers/selinux v1.6.0
|
||||
github.com/tchap/go-patricia v2.2.6
|
||||
github.com/willf/bitset d5bec3311243426a3c6d1b7a795f24b17c686dbb # 1.1.10+ used by selinux pkg
|
||||
github.com/willf/bitset v1.1.11
|
||||
|
||||
# containerd dependencies
|
||||
github.com/beorn7/perks v1.0.1
|
||||
|
Loading…
Reference in New Issue
Block a user