Commit Graph

70 Commits

Author SHA1 Message Date
Abel Feng
15887d7efc sandbox: add update api for controller
Signed-off-by: Abel Feng <fshb1988@gmail.com>
2024-06-14 02:31:51 +00:00
Mike Brown
98ebb3ecff
Merge pull request #9737 from everpeace/kep-3169-SupplementalGroupsPolicy
KEP-3619: Fine-grained SupplementalGroups control
2024-06-13 16:59:20 +00:00
Reinhard Tartler
09d3e20d3a Allow running test in usernamespace
Debian has started building packages with usernamespaces
to disable network access and similar isolation features. The
containerd package executes a unit test that fails in that
scenario, see https://bugs.debian.org/1070411

The code contains a conditional on whether it is running in
usernamepsace. This commit expands the unit test to cover
this behavior; it was previously untested.

The easiest way to reproduce this issue is to prefix the test
invocaiton with 'unshare -nr go test [...]'

Signed-off-by: Reinhard Tartler <siretart@gmail.com>
2024-06-12 00:36:54 +00:00
Shingo Omura
8bcffa9446
KEP-3619: Fine grained SupplementalGroups control
Signed-off-by: Shingo Omura <everpeace@gmail.com>
2024-06-12 09:10:40 +09:00
Akihiro Suda
1529259077
Merge pull request #10275 from dmcgowan/imgcrypt-revendor
Re-enable imgcrypt
2024-05-29 16:54:47 +00:00
Fu Wei
5d2c988a5a
Merge pull request #10201 from abel-von/retry-remote-sandbox-wait
sandbox: do retry for wait to remote sandbox controller
2024-05-29 00:00:29 +00:00
Derek McGowan
da1d9672f6
Enable imgcrypt in cri pull
Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-05-28 13:50:06 -07:00
Maksym Pavlenko
6383a1ce76
Merge pull request #10258 from bzsuni/bz/update/pause
update pause image to 3.10
2024-05-28 18:01:23 +00:00
Sebastiaan van Stijn
446e63579c
remove uses of platforms.Platform alias
Commit 3c8469a782 removed uses of the api
types.Platform type from public interfaces, instead using the type from
the OCI image spec.

For convenience, it also introduced an alias in the platforms package.
While this alias allows packages that already import containerd's
platforms package (now a separate module), it may also cause confusion
(it's not clear that it's an alias for the OCI type), and for packages
that do not depend on containerd's platforms package / module may now
be resulting in an extra dependency.

Let's remove the use of this alias, and instead use the OCI type directly.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-05-28 14:56:30 +02:00
bzsuni
22f2af40c0 update pause image to 3.10
Signed-off-by: bzsuni <bingzhe.sun@daocloud.io>
2024-05-25 08:17:46 +08:00
Mike Brown
87bab6cdc7
Merge pull request #10238 from MikeZappa87/feature/provideinternalloup
Add support to set loopback to up
2024-05-20 14:19:43 +00:00
Michael Zappa
332caf1a15 Provide ability to set lo up without CNI
Signed-off-by: Michael Zappa <michael.zappa@gmail.com>
2024-05-17 14:34:55 -06:00
Kazuyoshi Kato
24c2ae8115
Merge pull request #10026 from ningmingxiao/info_exited_event
internal/cri: log ctr's exit event on info level
2024-05-17 01:28:43 +00:00
Kazuyoshi Kato
ff66ec7a73
Merge pull request #10105 from fidencio/topic/fix-typos-in-image_pull_test.go
images: tests: Fix typos in the tests
2024-05-17 01:27:46 +00:00
Abel Feng
7cead88004 cri: restart created container with correct io type
Signed-off-by: Abel Feng <fshb1988@gmail.com>
2024-05-13 17:42:58 +08:00
Abel Feng
58be881890 sandbox: do retry for wait to remote sandbox controller
remote sandbox controller may restart, the Wait call should be retried
if it is an grpc disconnetion error.

Signed-off-by: Abel Feng <fshb1988@gmail.com>
2024-05-10 10:18:42 +08:00
Fu Wei
313fc12b8a
Merge pull request #9965 from abel-von/streaming-io
cri: support io by streaming API
2024-05-07 14:22:12 +00:00
Abel Feng
b8dfb4d8f5 cri: support io by streaming api
Signed-off-by: Abel Feng <fshb1988@gmail.com>
2024-05-07 20:26:40 +08:00
Phil Estes
04c7d6ccbf
Merge pull request #9960 from adrianreber/2024-03-12-criu-not-found
Return correct error if CRIU binary is missing
2024-05-06 19:41:38 +00:00
Derek McGowan
2ac2b9c909
Make api a Go sub-module
Allow the api to stay at the same v1 go package name and keep using a
1.x version number. This indicates the API is still at 1.x and allows
sharing proto types with containerd 1.6 and 1.7 releases.

Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-05-02 11:03:00 -07:00
Derek McGowan
e1b94c0e7d
Move protobuf package under pkg
Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-05-02 10:52:03 -07:00
Derek McGowan
4a45507772
Move runc options to api directory
Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-05-02 10:52:00 -07:00
Abel Feng
de38490ed6 sandbox: merge address and protocol to one url
Signed-off-by: Abel Feng <fshb1988@gmail.com>
2024-04-30 15:28:00 +08:00
Abel Feng
c3b306240e add task api endpoint in task create options
Signed-off-by: Abel Feng <fshb1988@gmail.com>
2024-04-30 15:22:44 +08:00
Abel Feng
b1fefccc78 sandbox: store endpoint in cri sandboxStore
Signed-off-by: Abel Feng <fshb1988@gmail.com>
2024-04-30 15:20:03 +08:00
Akihiro Suda
c27bcdc564
cri: introspectRuntimeFeatures: fix nil panic
Fix issue 10062

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2024-04-25 08:36:38 +09:00
Derek McGowan
1412a255ec
Merge pull request #10068 from kiashok/portForwardingWindows-ipv6
Account for ipv6 localhost in windows port forwarding
2024-04-22 21:14:18 +00:00
Fabiano Fidêncio
9ee3bfaba2
images: tests: Fix typos in the tests
This is a non-functional change, that fixes the following typos:
* Snashotter -> Snapshotter
* expectSnapshotter -> expectedSnapshotter
* expectErr -> expectedErr
* exiting-runtime -> existing-runtime

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2024-04-22 21:04:49 +02:00
Kirtana Ashok
7e60d5a074 Account for ipv4 vs ipv6 localhost
in windows port forwarding

Signed-off-by: Kirtana Ashok <kiashok@microsoft.com>
2024-04-19 11:30:49 -07:00
Maksim An
c7ea06a69b fix default working directory hostProcess
Per https://github.com/kubernetes/enhancements/tree/master/keps/sig-windows/1981-windows-privileged-container-support#container-mounts
the default working directory for `hostProcess` containers should
be `C:\hpc`, however the current default is set to windows default
which is `C:\`.

Signed-off-by: Maksim An <maksiman@microsoft.com>
2024-04-11 23:35:55 -07:00
Phil Estes
99693a32c2
Merge pull request #10041 from elezar/bump-container-device-interface-v0.7.1
Bump tags.cncf.io/container-device-interface to v0.7.1
2024-04-11 15:33:21 +00:00
Evan Lezar
1b62224181 Bump tags.cncf.io/container-device-interface to v0.7.1
This includes migrating from cdi.GetRegistry() to cdi.Configure() and
using top-level cdi Refresh and InjectDevices functions as applicable.

Signed-off-by: Evan Lezar <elezar@nvidia.com>
2024-04-10 15:25:11 +02:00
ChengyuZhu6
b6e3616949 cri: add pause image name to annotations
We are currently in the process of developing a feature to facilitate guest image pulling
on confidential-containers, and we would be grateful for containerd's support in this endeavor.
It would greatly assist our efforts if containerd could provide the pause image name and
add it into the annotations.

Fixes: #9418

Signed-off-by: ChengyuZhu6 <chengyu.zhu@intel.com>
2024-04-09 22:33:58 +08:00
ningmingxiao
7bd4d348eb add info of exited event
Signed-off-by: ningmingxiao <ning.mingxiao@zte.com.cn>
2024-04-01 19:49:29 +08:00
Danny Canter
2474a99c30 Add IsNotFound case to ListPodSandboxStats
Fixes #10013. It seems we can end up in a spot where the sandbox store still
has a listing for a pod, whereas containerds underlying store has removed it.
It might be better to shield the caller (k8s) from these transient errors.

Signed-off-by: Danny Canter <danny@dcantah.dev>
2024-03-30 21:20:22 -07:00
Kirtana Ashok
b97ef91fb7 Change port forwarding on windows
Signed-off-by: Kirtana Ashok <kiashok@microsoft.com>
2024-03-26 10:19:24 -07:00
Fu Wei
74938f6a06
Merge pull request #9885 from Iceber/fix_pin_loaded_pause_image
cri: ensure the pause image loaded in older versions is pinned
2024-03-26 13:40:56 +00:00
Sebastiaan van Stijn
26158609b5
pkg/seutil: move to internal/cri
This pacakge is only used internally in the cri package, which is an internal
packages, so we can make the utility internal as well.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-03-20 11:11:24 +01:00
Sebastiaan van Stijn
33732bc13e
pkg/systemd: move to internal/cri
This pacakge is only used internally in the cri package, which is an internal
packages, so we can make the utility internal as well.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-03-20 11:05:25 +01:00
zhanluxianshen
df26c189af
Clean cri options and useless parms
Signed-off-by: zhanluxianshen <zhanluxianshen@163.com>
2024-03-14 01:53:33 +00:00
Derek McGowan
88421068f7
Fix invalid event filter in podsandbox
Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-03-12 18:52:44 -07:00
Adrian Reber
218e2cf7cd
Return correct error if CRIU binary is missing
For the first version of containerd's "Forensic Container Checkpointing"
support the error message if the CRIU binary is not found was
deliberately wrong to not break Kubernetes e2e_node tests.

Now that the e2e_node tests have been adapted, containerd can return the
correct error message.

Signed-off-by: Adrian Reber <areber@redhat.com>
2024-03-12 08:29:30 +00:00
Adrian Reber
f25770e48d Wire through CRI ContainerCheckpoint RPC
This connects the new CRI ContainerCheckpoint RPC to the existing
internal checkpoint functions. With this commit it is possible
to checkpoint a container in Kubernetes using the Forensic Container
Checkpointing KEP (#2008):

 # curl X POST "https://localhost:10250/checkpoint/namespace/podId/container"

Which will result in containerd creating a checkpoint in the location
specified by Kubernetes (usually /var/lib/kubelet/checkpoints).

This is a Linux only feature because CRIU only exists on Linux.

Rewritten with the help of Phil Estes.

Signed-off-by: Phil Estes <estesp@gmail.com>
Signed-off-by: Adrian Reber <areber@redhat.com>
2024-03-07 17:34:07 +00:00
Fu Wei
de6a094a28
Merge pull request #9598 from abel-von/sandbox-plugin-0103
sandbox: add event monitor for podsandbox controller
2024-03-05 08:23:31 +00:00
Derek McGowan
1bf781d8eb
Cleanup introspection interface
Split service proxy from service plugin.
Make introspection service easier for clients to use.
Update service proxy to support grpc and ttrpc.

Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-03-01 23:07:42 -08:00
Abel Feng
d0da3d1caf sandbox: make event monitor in CRI independent
Signed-off-by: Abel Feng <fshb1988@gmail.com>
2024-03-01 10:30:52 +08:00
Fu Wei
6333db7701
Merge pull request #9891 from dmcgowan/move-events-plugin
Move events to plugins and core
2024-02-29 12:45:25 +00:00
Derek McGowan
72f21833b1
Move events to plugins and core
Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-02-27 22:09:20 -08:00
Iceber Gu
6d1dfe55fb cri: ensure the pause image loaded in older versions is pinned
Signed-off-by: Iceber Gu <caiwei95@hotmail.com>
2024-02-27 16:40:43 +08:00
Abel Feng
a0b73ae114 sandbox: optimize the lock in PodSandbox
Signed-off-by: Abel Feng <fshb1988@gmail.com>
2024-02-26 10:15:18 +08:00