Commit Graph

109 Commits

Author SHA1 Message Date
Kohei Tokunaga
3986f80c35
go.mod: bump up github.com/opencontainers/image-spec to v1.1.0-rc5
Release note: https://github.com/opencontainers/image-spec/releases/tag/v1.1.0-rc5

Signed-off-by: Kohei Tokunaga <ktokunaga.mail@gmail.com>
2023-10-17 10:19:55 +09: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
Rodrigo Campos
fce1b95076 go.mod: Update runtime spec to include features.MountExtensions
Future patches will use that field.

Signed-off-by: Rodrigo Campos <rodrigoca@microsoft.com>
2023-09-13 16:44:54 +02:00
Sebastiaan van Stijn
05093d7c07
vendor: github.com/cncf-tags/container-device-interface v0.6.1
Removes uses of the github.com/opencontainers/runc/libcontainer/devices
package.

full diff: https://github.com/cncf-tags/container-device-interface/compare/v0.6.0...v0.6.1

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-09-08 13:53:43 +02:00
Sebastiaan van Stijn
7d0ab4fc2c
remove uses of github.com/runc/libcontainer/cgroups
runc considers libcontainer to be "unstable" (not for external use),
so we try not to use it. Commit ed47d6ba76
brought back the dependency on other parts of libcontainer, but looks to
be only depending on a single utility, which in itself was borrowed from
github.com/coreos/go-systemd to not introduce CGO code in the same package.

This patch copies the version from github.com/coreos/go-systemd (adding
proper attribution, although the function is pretty trivial).

runc is in process of moving the libcontainer/user package to an external
module, which means we can remove the dependency on libcontainer entirely
in the near future. There is one more use of `libcontainer` in our vendor
tree; it looks like CDI is depending on one utility (devices.DeviceFromPath);
a943033a8b/vendor/github.com/container-orchestrated-devices/container-device-interface/pkg/cdi/container-edits_unix.go (L38)

We should remove the dependency on that utility, and add a CI check to
prevent bringing it back.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-09-01 12:10:55 +02:00
Akihiro Suda
f35d1f08ec
go.mod: github.com/opencontainers/runc v1.1.9
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2023-08-11 21:25:29 +09:00
Markus Lehtonen
ed47d6ba76 cri: implement RuntimeConfig rpc
The rpc only reports one field, i.e. the cgroup driver, to kubelet.
Containerd determines the effective cgroup driver by looking at all
runtime handlers, starting from the default runtime handler (the rest in
alphabetical order), and returning the cgroup driver setting of the
first runtime handler that supports one. If no runtime handler supports
cgroup driver (i.e. has a config option for it) containerd falls back to
auto-detection, returning systemd if systemd is running and cgroupfs
otherwise.

This patch implements the CRI server side of Kubernetes KEP-4033:
https://github.com/kubernetes/enhancements/tree/master/keps/sig-node/4033-group-driver-detection-over-cri

Signed-off-by: Markus Lehtonen <markus.lehtonen@intel.com>
2023-07-28 13:50:43 +03:00
Akihiro Suda
895dd2e93b
go.mod: github.com/opencontainers/image-spec v1.1.0-rc4
https://github.com/opencontainers/image-spec/compare/v1.1.0-rc3...v1.1.0-rc4

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2023-07-23 03:07:58 +09:00
Akihiro Suda
6f715ab101
go.mod: github.com/containerd/go-runc v1.1.0
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2023-05-17 13:45:37 +09:00
Akihiro Suda
4347fc8bc2
go.mod: github.com/opencontainers/image-spec v1.1.0-rc3
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2023-05-09 23:35:58 +09:00
Akihiro Suda
5e054ee631
go.mod: github.com/opencontainers/runtime-spec v1.1.0-rc.2
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2023-05-09 22:26:37 +09:00
Sebastiaan van Stijn
cbd10e41a6
vendor: github.com/opencontainers/runc v1.1.6
release notes: https://github.com/opencontainers/runc/releases/tag/v1.1.6
full diff: opencontainers/runc@v1.1.5...v1.1.6

This is the sixth patch release in the 1.1.z series of runc, which fixes
a series of cgroup-related issues.

Note that this release can no longer be built from sources using Go
1.16. Using a latest maintained Go 1.20.x or Go 1.19.x release is
recommended. Go 1.17 can still be used.

- systemd cgroup v1 and v2 drivers were deliberately ignoring UnitExist error
  from systemd while trying to create a systemd unit, which in some scenarios
  may result in a container not being added to the proper systemd unit and
  cgroup.
- systemd cgroup v2 driver was incorrectly translating cpuset range from spec's
  resources.cpu.cpus to systemd unit property (AllowedCPUs) in case of more
  than 8 CPUs, resulting in the wrong AllowedCPUs setting.
- systemd cgroup v1 driver was prefixing container's cgroup path with the path
  of PID 1 cgroup, resulting in inability to place PID 1 in a non-root cgroup.
- runc run/start may return "permission denied" error when starting a rootless
  container when the file to be executed does not have executable bit set for
  the user, not taking the CAP_DAC_OVERRIDE capability into account. This is
  a regression in runc 1.1.4, as well as in Go 1.20 and 1.20.1
- cgroup v1 drivers are now aware of misc controller.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-04-27 11:59:14 +02:00
Sebastiaan van Stijn
ec9e74ed92
go.mod: remove replace for github.com/opencontainers/runtime-tools
The replace rule was actually downgrading the package by one commit;
946c877fa8...2e043c6bd6

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-04-15 13:01:24 +02:00
Akihiro Suda
2b4f830ede
go.mod: github.com/opencontainers/selinux v1.11.0
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2023-03-07 22:06:39 +09:00
Akihiro Suda
6bfc82dafe
go.mod: github.com/opencontainers/runtime-spec v1.1.0-rc.1
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2023-03-07 22:06:39 +09:00
Krisztian Litkey
43704ca888 nri: add experimental NRI plugin.
Add a common NRI 'service' plugin. It takes care of relaying
requests and respones to and from NRI (external NRI plugins)
and the high-level containerd namespace-independent logic of
applying NRI container adjustments and updates to actual CRI
and other containers.

The namespace-dependent details of the necessary container
manipulation operations are to be implemented by namespace-
specific adaptations. This NRI plugin defines the API which
such adaptations need to implement.

Signed-off-by: Krisztian Litkey <krisztian.litkey@intel.com>
2022-11-28 21:51:06 +02:00
Kevin Parsons
e6b5311508
Merge pull request #7483 from jterry75/jterry75/update_image_config_argsescaped
Updates oci image config to support upstream ArgsEscaped
2022-10-11 16:32:31 -07:00
Justin Terry
d4b9dade13 Updates oci image config to support upstream ArgsEscaped
ArgsEscaped has now been merged into upstream OCI image spec.
This change removes the workaround we were doing in containerd
to deserialize the extra json outside of the spec and instead
just uses the formal spec types.

Signed-off-by: Justin Terry <jlterry@amazon.com>
2022-10-11 13:29:56 -07:00
Sebastiaan van Stijn
e2d8f3859a
vendor: github.com/opencontainers/selinux v1.10.2
full diff: https://github.com/opencontainers/selinux/compare/v1.10.1...v1.10.2

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-10-05 22:33:35 +02:00
log1cb0mb
ae29594d0b Bump opencontainers/selinux from 1.10.0 to 1.10.1
Signed-off-by: Nabeel Rana <nabeelnrana@gmail.com>
2022-04-27 22:55:25 +03:00
Ed Bartosh
825c1c58a9 CDI: update go.mod and vendor deps
Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com>
2022-04-06 13:10:59 +03:00
Kazuyoshi Kato
388ee880d2 Upgrade containerd/imgcrypt and opencontainers/image-spec
- Upgrade github.com/containerd/imgcrypt to prepare for typeurl upgrade
  (see https://github.com/containerd/imgcrypt/pull/72)
- Upgrade github.com/opencontainers/image-spec since imgcrypto needs at
  least 1.0.2.

Signed-off-by: Kazuyoshi Kato <katokazu@amazon.com>
2022-03-22 21:17:18 +00:00
Kazuyoshi Kato
040babe003 Vendor dependencies with module graph pruning
The empty-mod hack no longer works with Go 1.18.

This commit fixes #6586.

Signed-off-by: Kazuyoshi Kato <katokazu@amazon.com>
2022-03-18 16:49:09 +00:00
Akihiro Suda
21a748e381
go.mod: github.com/opencontainers/runc v1.1.0
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2022-01-18 13:35:22 +09:00
Sebastiaan van Stijn
fc8138468f
go.mod: update image-spec to latest (v1.0.3-dev)
The OCI image spec did a v1.0.2 security release for CVE-2021-41190, however
commit 09c9270fee, depends on MediaTypes that
have not yet been released by the OCI image-spec, so using current "main" instead.

full diff: 5ad6f50d62...693428a734

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-12-09 17:50:09 +01:00
Kohei Tokunaga
09c9270fee images: enable converter to uncompress zstd
Currently uncompress converter only supports gzip. This commit fixes it to
support zstd as well.

Signed-off-by: Kohei Tokunaga <ktokunaga.mail@gmail.com>
2021-09-27 11:08:44 +09:00
Akihiro Suda
a12c7bd1cf
go.mod: runc v1.0.1
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2021-07-18 20:39:34 +09:00
Akihiro Suda
f913a42755 go.mod: runc v1.0.0
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2021-06-22 10:26:46 -04:00
Davanum Srinivas
9a451d103c
Update opencontainers/selinux to v1.8.2
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2021-06-03 10:35:11 -04:00
Davanum Srinivas
1093f05ab2
Bump github.com/opencontainers/selinux from 1.8.0 to 1.8.1
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2021-05-18 11:08:04 -04:00
Davanum Srinivas
de6db4038c
Update vendored runc to v1.0.0.0-rc94
Note that this is the code in containerd that uses runc (as almost
a library). Please see the other commit for the update to runc binary
itself.

Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2021-05-10 13:12:48 -04:00
Sebastiaan van Stijn
9bc8d63c9f
cri/server: use containerd/oci instead of libcontainer/devices
Looks like we had our own copy of the "getDevices" code already, so use
that code (which also matches the code that's used to _generate_ the spec,
so a better match).

Moving the code to a separate file, I also noticed that the _unix and _linux
code was _exactly_ the same (baring some `//nolint:` comments), so also
removing the duplicated code.

With this patch applied, we removed the dependency on the libcontainer/devices
package (leaving only libcontainer/user).

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-04-08 23:25:21 +02:00
Sebastiaan van Stijn
04d061fa6a
update runc to v1.0.0-rc93
full diff: https://github.com/opencontainers/runc/compare/v1.0.0-rc92...v1.0.0-rc93

also removes dependency on libcontainer/configs

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-02-04 16:13:30 +01:00
Akihiro Suda
7e6e4c466f
remove "selinux" build tag
The build tag was removed in go-selinux v1.8.0: opencontainers/selinux#132

Related: remove "apparmor" build tag: 0a9147f3aa

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2020-12-15 20:05:25 +09:00
Shengjing Zhu
7e46676e7c Go mod vendor
Signed-off-by: Shengjing Zhu <zhsj@debian.org>
2020-12-01 01:41:25 +08:00
Sebastiaan van Stijn
eba94a15c8
pkg/cri/server: remove dependency on libcontainer/apparmor, libcontainer/utils
recent versions of libcontainer/apparmor simplified the AppArmor
check to only check if the host supports AppArmor, but no longer
checks if apparmor_parser is installed, or if we're running
docker-in-docker;

bfb4ea1b1b

> The `apparmor_parser` binary is not really required for a system to run
> AppArmor from a runc perspective. How to apply the profile is more in
> the responsibility of higher level runtimes like Podman and Docker,
> which may do the binary check on their own.

This patch copies the logic from libcontainer/apparmor, and
restores the additional checks.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-11-12 15:42:25 +01:00
Akihiro Suda
8433602989
update runc to v1.0.0-rc92
Changes: https://github.com/opencontainers/runc/releases/tag/v1.0.0-rc92

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2020-08-06 20:31:33 +09:00
Akihiro Suda
362b7167a7
vendor: update cri (no more libseccomp cgo dependency)
8448b92d23...8871d5cdf8

The cgo dependency on libseccomp was removed in containerd/cri#1548.

The `seccomp` build tag is now ignored (and the seccomp support is
always built-in).

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2020-07-31 14:32:08 +09:00
Jintao Zhang
b870231854 vendor runc library to v1.0.0-rc91-48-g67169a9d
Signed-off-by: Jintao Zhang <zhangjintao9020@gmail.com>
2020-07-29 14:52:48 +08:00
Michael Crosby
3611efdcef update cri to 8448b92d23
This includes an update of the selinux package and the ability in the CRI
configuration to set the upper bounds for the selinux category labels that are
generated.

Signed-off-by: Michael Crosby <michael@thepasture.io>
2020-07-23 17:11:18 -04:00
Davanum Srinivas
212c29833f
Updates to go-systemd and selinux
caught these when i was looking at cadvisor's deps.

Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2020-07-15 17:08:34 -04:00
Davanum Srinivas
963625d7bc
Update runc to v1.0.0-rc91
https://github.com/opencontainers/runc/releases/tag/v1.0.0-rc91

Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2020-07-04 14:46:03 -04:00
Michael Crosby
785f4c5cd9 Bump CRI for 1.4x release
includes selinux bump.

Signed-off-by: Michael Crosby <michael@thepasture.io>
2020-06-15 16:07:00 -04:00
Michael Crosby
c5273930bd Update CRI to 52c2c6b5df
This bump contains updates for CRI with selinux support.

Signed-off-by: Michael Crosby <michael@thepasture.io>
2020-05-26 21:06:18 -04:00
Sebastiaan van Stijn
3e7bbb8a49
vendor: update containerd/cri, remove "docker/distribution" dependency
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-05-12 15:00:51 +02:00
Sebastiaan van Stijn
2c77dc63a4
vendor: update containerd/cri to current master
- Remove dependency on libcontainer/system
- Get rid of socat for port forwarding
- Roll docker/distribution back to latest (v2.7.1) release
  Now that 901bcb2231 was merged in containerd,
  we no longer depend on the ParseDockerRef utility from docker/distribution,
  so we can safely roll back to the latest release for this dependency.
- vendor: kubernetes v1.18.2
  Fix client watch reestablishment handling of client-side timeouts
- Add config flag to default empty seccomp profile

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-05-11 09:09:39 +02:00
Davanum Srinivas
f328f61b81
Update to selinux 1.5.1
Changes are listed here:
https://github.com/opencontainers/selinux/compare/v1.3.3...v1.5.1

Not urgent as such, just keep up with eco-system.

Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2020-04-08 06:29:50 -04:00
Sebastiaan van Stijn
e822296fc4
vendor: runtime-spec v1.0.2
full diff: 29686dbc55...v1.0.2

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-04-04 00:21:43 +02:00
Davanum Srinivas
026e43806a
Update to a released version of opencontainers/selinux (1.3.3)
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2020-02-28 11:34:40 -05:00
Phil Estes
a1e0303e7a
Merge pull request #3978 from dims/sync-with-latest-containerd-cri-master-including-selinux-change
Sync with latest changes in containerd/cri
2020-01-25 23:41:13 +02:00