Skip to content

Commit fe9bb8d

Browse files
authored
Merge branch 'master' into ssdoc
2 parents 375dd76 + 63400c7 commit fe9bb8d

106 files changed

Lines changed: 30519 additions & 1376 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

docs/config.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,10 @@ version = 2
111111
# stargz snapshotter (https://github.com/containerd/stargz-snapshotter)
112112
disable_snapshot_annotations = false
113113

114+
# discard_unpacked_layers allows GC to remove layers from the content store after
115+
# successfully unpacking these layers to the snapshotter.
116+
discard_unpacked_layers = false
117+
114118
# default_runtime_name is the default runtime name to use.
115119
default_runtime_name = "runc"
116120

docs/registry.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,11 +113,13 @@ to add your _json_key authentication for gcr.io domain image pull
113113
requests:
114114

115115
```
116+
version = 2
117+
116118
[plugins."io.containerd.grpc.v1.cri".registry]
117119
[plugins."io.containerd.grpc.v1.cri".registry.mirrors]
118120
[plugins."io.containerd.grpc.v1.cri".registry.mirrors."docker.io"]
119121
endpoint = ["https://registry-1.docker.io"]
120-
[plugins.cri.registry.mirrors."gcr.io"]
122+
[plugins."io.containerd.grpc.v1.cri".registry.mirrors."gcr.io"]
121123
endpoint = ["https://gcr.io"]
122124
[plugins."io.containerd.grpc.v1.cri".registry.configs]
123125
[plugins."io.containerd.grpc.v1.cri".registry.configs."gcr.io".auth]

pkg/config/config.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,11 @@ type ContainerdConfig struct {
8080
// related information) to snapshotters. These annotations are required by
8181
// stargz snapshotter (https://github.com/containerd/stargz-snapshotter).
8282
DisableSnapshotAnnotations bool `toml:"disable_snapshot_annotations" json:"disableSnapshotAnnotations"`
83+
84+
// DiscardUnpackedLayers is a boolean flag to specify whether to allow GC to
85+
// remove layers from the content store after successfully unpacking these
86+
// layers to the snapshotter.
87+
DiscardUnpackedLayers bool `toml:"discard_unpacked_layers" json:"discardUnpackedLayers"`
8388
}
8489

8590
// CniConfig contains toml config related to cni

pkg/server/image_pull.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,12 @@ func (c *criService) PullImage(ctx context.Context, r *runtime.PullImageRequest)
127127
containerd.WithImageHandlerWrapper(appendInfoHandlerWrapper(ref)))
128128
}
129129

130+
if c.config.ContainerdConfig.DiscardUnpackedLayers {
131+
// Allows GC to clean layers up from the content store after unpacking
132+
pullOpts = append(pullOpts,
133+
containerd.WithChildLabelMap(containerdimages.ChildGCLabelsFilterLayers))
134+
}
135+
130136
image, err := c.client.Pull(ctx, ref, pullOpts...)
131137
if err != nil {
132138
return nil, errors.Wrapf(err, "failed to pull and unpack image %q", ref)

vendor.conf

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@ github.com/willf/bitset d5bec3311243426a3c6d1b7a795f
88
github.com/beorn7/perks v1.0.1
99
github.com/BurntSushi/toml v0.3.1
1010
github.com/cespare/xxhash/v2 v2.1.1
11-
github.com/containerd/cgroups e9676da73eddf8ed2433f77aaf3b9cf8f0f75b8c
11+
github.com/containerd/cgroups 318312a373405e5e91134d8063d04d59768a1bff
1212
github.com/containerd/console v1.0.0
13-
github.com/containerd/containerd v1.4.0-beta.0
13+
github.com/containerd/containerd d184a0a3430dc4a17a47cce37fb36126ac0c699a
1414
github.com/containerd/continuity d3ef23f19fbb106bb73ffde425d07a9187e30745
1515
github.com/containerd/fifo f15a3290365b9d2627d189e619ab4008e0069caf
1616
github.com/containerd/go-runc 7016d3ce2328dd2cb1192b2076ebd565c4e8df0c
1717
github.com/containerd/ttrpc v1.0.1
1818
github.com/containerd/typeurl v1.0.1
19-
github.com/coreos/go-systemd/v22 v22.0.0
19+
github.com/coreos/go-systemd/v22 v22.1.0
2020
github.com/cpuguy83/go-md2man/v2 v2.0.0
2121
github.com/docker/go-events e31b211e4f1cd09aa76fe4ac244571fab96ae47f
2222
github.com/docker/go-metrics v0.0.1
@@ -49,12 +49,12 @@ github.com/shurcooL/sanitized_anchor_name v1.0.0
4949
github.com/sirupsen/logrus v1.6.0
5050
github.com/syndtr/gocapability d98352740cb2c55f81556b63d4a1ec64c5a319c2
5151
github.com/urfave/cli v1.22.1 # NOTE: urfave/cli must be <= v1.22.1 due to a regression: https://github.com/urfave/cli/issues/1092
52-
go.etcd.io/bbolt v1.3.3
52+
go.etcd.io/bbolt v1.3.5
5353
go.opencensus.io v0.22.0
5454
golang.org/x/net f3200d17e092c607f615320ecaad13d87ad9a2b3
5555
golang.org/x/sync 42b317875d0fa942474b76e1b46a6060d720ae6e
5656
golang.org/x/sys 9dae0f8f577553e0f21298e18926efc9644c281d
57-
golang.org/x/text 19e51611da83d6be54ddafce4a4af510cb3e9ea4
57+
golang.org/x/text v0.3.3
5858
google.golang.org/genproto e50cd9704f63023d62cd06a1994b98227fc4d21a
5959
google.golang.org/grpc v1.27.1
6060

vendor/github.com/containerd/cgroups/blkio.go

Lines changed: 5 additions & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/containerd/cgroups/cgroup.go

Lines changed: 7 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/containerd/cgroups/cpu.go

Lines changed: 2 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/containerd/cgroups/cpuset.go

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/containerd/cgroups/devices.go

Lines changed: 1 addition & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)