Commit Graph

14254 Commits

Author SHA1 Message Date
Bjorn Neergaard
69034f7558
pkg/display: use mediatype helpers
Signed-off-by: Bjorn Neergaard <bjorn.neergaard@docker.com>
2023-09-27 13:12:50 -06:00
Bjorn Neergaard
5ab04ac5a1
pkg/unpack: use mediatype helpers
Signed-off-by: Bjorn Neergaard <bjorn.neergaard@docker.com>
2023-09-27 13:12:49 -06:00
Bjorn Neergaard
da11969793
pkg/snapshotters: use mediatype helpers
Signed-off-by: Bjorn Neergaard <bjorn.neergaard@docker.com>
2023-09-27 13:12:48 -06:00
Bjorn Neergaard
f1cbc5f90c
containerd: use mediatype helpers
Signed-off-by: Bjorn Neergaard <bjorn.neergaard@docker.com>
2023-09-27 13:12:47 -06:00
Akihiro Suda
9ca6fd9e6e
Merge pull request #9117 from kinvolk/rata/userns-chown-opt-in
Require opt-in for rootfs chown when idmap mounts is not supported
2023-09-28 02:34:41 +09:00
Akihiro Suda
719fa3d3f7
Merge pull request #9114 from thaJeztah/remove_libcontainer
remove github.com/opencontainers/runc dependency
2023-09-28 02:17:02 +09:00
Phil Estes
61a8905012
Merge pull request #9154 from neersighted/image_cleanup
images: use mediatype helpers
2023-09-27 12:33:29 -04:00
Sebastiaan van Stijn
4b1bb1293e
remove github.com/opencontainers/runc dependency
This migrates uses of github.com/opencontainers/runc/libcontainer/user
to the new github.com/moby/sys/user module, which was extracted from
runc at commit [opencontainers/runc@a3a0ec48c4].

This is the initial release of the module, which is a straight copy, but
some changes may be made in the next release (such as fixing camel-casing
in some fields and functions (Uid -> UID).

[opencontainers/runc@a3a0ec48c4]: a3a0ec48c4

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-09-27 17:34:28 +02:00
Bjorn Neergaard
62f621a344
images: simplify mediatype logic
Signed-off-by: Bjorn Neergaard <bjorn.neergaard@docker.com>
2023-09-27 09:29:57 -06:00
Bjorn Neergaard
377c5ca9cd
images/archive: use mediatype helpers
Signed-off-by: Bjorn Neergaard <bjorn.neergaard@docker.com>
2023-09-27 09:29:56 -06:00
Bjorn Neergaard
bb8a472f24
images: use mediatype helpers
Signed-off-by: Bjorn Neergaard <bjorn.neergaard@docker.com>
2023-09-27 09:29:54 -06:00
Derek McGowan
e7254406c9
Require plugins to succeed after registering readiness
When readiness is registered on initialization, the plugin must not
fail. When such a plugin fails, containerd will hang on the readiness
condition.

Signed-off-by: Derek McGowan <derek@mcg.dev>
2023-09-26 17:10:55 -07:00
Derek McGowan
62f273d508
Add migrate subcommand to config command
Allows applying migration to existing configurations

Signed-off-by: Derek McGowan <derek@mcg.dev>
2023-09-26 16:54:24 -07:00
Derek McGowan
0320ad1843
Add config migration to plugin package
Add reset registrations function to plugin package

Signed-off-by: Derek McGowan <derek@mcg.dev>
2023-09-26 16:53:35 -07:00
Derek McGowan
f58158e2d3
Add config migration and bump config version
Allows plugins to migrate from older configurations

Signed-off-by: Derek McGowan <derek@mcg.dev>
2023-09-26 16:53:33 -07:00
Akihiro Suda
9ffb34ac49
Merge pull request #9054 from macOScontainers/canonicalize-filter-mount-path
Fix usages of `mountinfo.PrefixFilter`
2023-09-27 05:10:27 +09:00
Bryant Biggs
bf4fbe4e87 docs: Update transfer service docs to reflect completed implementations for 1.7
Signed-off-by: Bryant Biggs <bryantbiggs@gmail.com>
2023-09-26 12:31:19 -04:00
Phil Estes
bcd658c76c
Merge pull request #9146 from thaJeztah/nil_error
images: Config: explicitly return nil-error
2023-09-26 12:27:00 -04:00
Phil Estes
5444dae0d4
Merge pull request #9120 from dmcgowan/image-usage-test
Image usage test
2023-09-26 11:59:31 -04:00
Phil Estes
9fded7ca7d
Merge pull request #9143 from dmcgowan/plugin-config-unknown-fields
Add warning for plugin configs with unknown fields
2023-09-26 11:55:39 -04:00
Sebastiaan van Stijn
b40e95e0ea
images: Config: explicitly return nil-error
just a minor nit :)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-09-26 13:20:41 +02:00
Derek McGowan
36c2222d3f
Add usage calculation test
Signed-off-by: Derek McGowan <derek@mcg.dev>
2023-09-25 20:18:13 -07:00
Derek McGowan
3b60e93667
Create new imagetest package
Signed-off-by: Derek McGowan <derek@mcg.dev>
2023-09-25 20:18:13 -07:00
Maksym Pavlenko
c33249cbe6
Merge pull request #9142 from jsturtevant/no-changes-wasm
Allow for images with artifacts layers to pull and run
2023-09-25 19:03:06 -07:00
Derek McGowan
4c344f2fa5
Add warning for plugin configs with unknown fields
Signed-off-by: Derek McGowan <derek@mcg.dev>
2023-09-25 16:09:15 -07:00
James Sturtevant
a9ba33f8ff Allow for images with artifacts to pull
Signed-off-by: James Sturtevant <jstur@microsoft.com>
2023-09-25 22:10:19 +00:00
Phil Estes
0f3d312aca
Merge pull request #9131 from dmcgowan/toml-v2
Update go-toml to v2
2023-09-25 08:52:15 -04:00
Derek McGowan
650148313c
Add warning log for unknown config fields
Add error log for failure to parse toml

Signed-off-by: Derek McGowan <derek@mcg.dev>
2023-09-24 20:50:54 -07:00
Derek McGowan
f11033174e
Merge pull request #9129 from kinvolk/rata/userns-doc
docs/userns: Clarify requirements for k8s 1.25/1.26
2023-09-22 22:22:58 -07:00
Derek McGowan
b5615caf11
Update go-toml to v2
Updates host file parsing to use new v2 method rather than the removed
toml.Tree.

Signed-off-by: Derek McGowan <derek@mcg.dev>
2023-09-22 15:35:12 -07:00
Derek McGowan
e0e6f870b7
Merge pull request #9086 from dmcgowan/move-to-log-repo
Use github.com/containerd/log
2023-09-22 09:25:29 -07:00
Derek McGowan
8b413daff0
Remove log package except for exported const used by hcsshim
Signed-off-by: Derek McGowan <derek@mcg.dev>
2023-09-22 07:53:23 -07:00
Derek McGowan
2f1b92710a
Update zfs library to use new log repository
Signed-off-by: Derek McGowan <derek@mcg.dev>
2023-09-22 07:53:23 -07:00
Derek McGowan
508aa3a1ef
Move to use github.com/containerd/log
Add github.com/containerd/log to go.mod

Signed-off-by: Derek McGowan <derek@mcg.dev>
2023-09-22 07:53:23 -07:00
Rodrigo Campos
f1070c4e18 docs/userns: Clarify requirements for k8s 1.25/1.26
crun 1.4.3 as well as runc 1.1 both support to open bind-mounts before
dropping privileges, as they are inaccessible after switching to the
user namespace. So that is the minimum version to use with containerd
1.7.

Also, since containerd 2.0 we use idmap mounts for files mounted in the
container created by containerd (like etc/hostname, etc/hosts, etc.), so
in that case we require newer OCI runtimes too. However, as the kubelet
doesn't request idmap mounts for kube volumes, we can lower the kernel
version.

Signed-off-by: Rodrigo Campos <rodrigoca@microsoft.com>
2023-09-22 15:52:38 +02:00
Fu Wei
7a0e6b7e77
Merge pull request #9112 from adityaramani/handle-shim-kill
Sandbox: Handle unexpected shim kill events
2023-09-22 13:31:11 +08:00
Akihiro Suda
3ebe5d1c56
Merge pull request #9124 from dmcgowan/cri-image-store-no-client
Update CRI image store to not use containerd client
2023-09-21 19:17:21 +09:00
Davanum Srinivas
b101cad15c
Merge pull request #9126 from bryantbiggs/fix/add-containerd-namespace
fix: Add `containerd` to the message type reference
2023-09-20 22:51:43 -04:00
Samuel Karp
87671c2dee
Merge pull request #9122 from henry118/netns-doc 2023-09-20 16:25:15 -07:00
Bryant Biggs
42eee8bf05 fix: Add containerd to the message type reference
Signed-off-by: Bryant Biggs <bryantbiggs@gmail.com>
2023-09-20 16:32:05 -04:00
Derek McGowan
c3694aaf87
Merge pull request #9093 from thaJeztah/swap_log_pkg_alias
alias log package to github.com/containerd/log v0.1.0, and (soft)deprecate
2023-09-20 11:45:59 -07:00
Derek McGowan
9e819fb4a8
Update CRI image store to not use containerd client
Signed-off-by: Derek McGowan <derek@mcg.dev>
2023-09-20 10:11:51 -07:00
Henry Wang
dcb2e7447b Improve doc of func NewNetNS
Signed-off-by: Henry Wang <henwang@amazon.com>
2023-09-20 17:00:33 +00:00
Fu Wei
782ad19f6c
Merge pull request #8356 from dmcgowan/drop-inheritable-capabilities
Support for dropping inheritable capabilities
2023-09-20 09:40:45 +08:00
Derek McGowan
2ce971d890
Add delete target to image remove
Adds atomicity to image delete when deleting from a list.

Signed-off-by: Derek McGowan <derek@mcg.dev>
2023-09-19 17:23:33 -07:00
Derek McGowan
f8fb2dad39
api: update image service to support target in delete request
Signed-off-by: Derek McGowan <derek@mcg.dev>
2023-09-19 17:17:16 -07:00
Rodrigo Campos
8e3722c7d1 CI: Set slow_chown for overlayfs snapshotter
Userns requires idmap mounts or to opt-in for a slow and expensive
chown. As idmap mounts support for overlayfs was merged in 5.19, let's
add the slow_chown config for our CI.

The config is harmless to keep it in new kernels, as if idmap mounts is
supported, it will be just used. Whenever all our CI is run with kernels
>= 5.19, we can remove this setting.

Signed-off-by: Rodrigo Campos <rodrigoca@microsoft.com>
2023-09-19 17:55:47 +02:00
Rodrigo Campos
46d3094aa3 docs/userns: Fix small typo
Signed-off-by: Rodrigo Campos <rodrigoca@microsoft.com>
2023-09-19 16:37:40 +02:00
Rodrigo Campos
d008d64a8f docs/userns: Clarify containerd 1.7 limitations
Signed-off-by: Rodrigo Campos <rodrigoca@microsoft.com>
2023-09-19 16:37:40 +02:00
Rodrigo Campos
e379082000 docs/userns: Document the need to opt-in for a slow chown
Signed-off-by: Rodrigo Campos <rodrigoca@microsoft.com>
2023-09-19 16:37:40 +02:00