Commit Graph

14629 Commits

Author SHA1 Message Date
a9add11578 Ignore reading-only judgment 2025-05-08 21:17:13 +02:00
Shiming Zhang
a0bd8c6f2d Add OCI/Image Volume Source support
Signed-off-by: Shiming Zhang <wzshiming@hotmail.com>
2025-05-08 21:17:13 +02:00
Brad Davidson
63272c3b7a
Enable btrfs/fuse-overlayfs/stargz snapshotter plugins
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2025-03-20 21:34:00 +00:00
Brad Davidson
07701fd755
Add rewrite support to hosts.toml loader
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2025-03-20 21:34:00 +00:00
Jacob Blain Christen
48894d6f5e
Mirror repository rewrites (v1.1)
Support CRI configuration to allow for request-time rewrite rules
applicable only to the repository portion of resource paths when pulling
images. Because the rewrites are applied at request time, images
themselves will not be "rewritten" -- images as stored by CRI (and the
underlying containerd facility) will continue to present as normal.

As an example, if you use the following config for your containerd:
```toml
[plugins]
  [plugins."io.containerd.grpc.v1.cri"]
    [plugins."io.containerd.grpc.v1.cri".registry]
      [plugins."io.containerd.grpc.v1.cri".registry.mirrors]
        [plugins."io.containerd.grpc.v1.cri".registry.mirrors."docker.io"]
          endpoint = ["https://registry-1.docker.io/v2"]
       	  [plugins."io.containerd.grpc.v1.cri".registry.mirrors."docker.io".rewrite]
            "^library/(.*)" = "my-org/$1"
```

And then subsequently invoke `crictl pull alpine:3.13` it will pull
content from `docker.io/my-org/alpine:3.13` but still show up as
`docker.io/library/alpine:3.13` in the `crictl images` listing.

This commit has been reworked from the original implementation. Rewites
are now done when resolving instead of when building the request, so
that auth token scopes stored in the context properly reflect the
rewritten repository path. For the original implementation, see
06c4ea9baec2b278b8172a789bf601168292f645.
Ref: https://github.com/k3s-io/k3s/issues/11191#issuecomment-2455525773

Signed-off-by: Jacob Blain Christen <jacob@rancher.com>
Co-authored-by: Brad Davidson <brad.davidson@rancher.com>
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2025-03-20 21:34:00 +00:00
Brad Davidson
b5eb7da8e5
Remove GRPC metrics
These conflict with other GRPC servers when running embedded

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2025-03-20 21:33:59 +00:00
ningmingxiao
2879c0790c
cri:fix containerd panic when can't find sandbox extension
Signed-off-by: ningmingxiao <ning.mingxiao@zte.com.cn>
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2025-03-20 21:33:53 +00:00
Derek McGowan
1a43cb6a10
Merge commit from fork
[release 2.0] validate uid/gid
2025-03-18 01:23:21 +08:00
Derek McGowan
bf82ae2582
Merge pull request #11541 from dmcgowan/prepare-2.0.4
[release/2.0] Prepare release notes for v2.0.4
2025-03-18 01:21:27 +08:00
Derek McGowan
06a886a8e4
Prepare release notes for v2.0.4
Signed-off-by: Derek McGowan <derek@mcg.dev>
2025-03-13 18:47:26 -07:00
Akihiro Suda
e9989a2147
Merge pull request #11536 from k8s-infra-cherrypick-robot/cherry-pick-11508-to-release/2.0
[release/2.0] Respect `client.WithTimeout` option on connect
2025-03-14 09:30:39 +09:00
Akihiro Suda
b6ab437d2b
Merge pull request #11537 from k8s-infra-cherrypick-robot/cherry-pick-11327-to-release/2.0
[release/2.0] Update image type checks to avoid unnecessary logs for attestations
2025-03-14 09:07:49 +09:00
Paweł Gronowski
916d487226 core/remotes: Handle attestations in MakeRefKey
Don't produce `reference for unknown type: application/vnd.in-toto+json`
warning logs when pushing/fetching an image containing the attestation
manifests.

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-03-13 18:18:21 +00:00
Paweł Gronowski
df4d905a6f core/images: Ignore attestations when traversing children
Before this patch, calling `image.Children` on an image built with
BuildKit would produce unnecessary `encountered unknown type
application/vnd.in-toto+json; children may not be fetched` debug logs,
because the media type is neither a known layer or config type.

Make the `image.Children` aware of the attestation layers and don't
attempt to traverse them.

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-03-13 18:18:21 +00:00
Paweł Gronowski
6b5efba83b client: Respect client.WithTimeout option
Fix the gRPC client dialer not using the timeout passed by the
containerd client timeout option.

Commit 63b4688175 replaced the usage of deprecated `grpc.DialContext`
with `grpc.NewClient`.

However, the `dialer.ContextDialer` relied on the context deadline to
propagate the timeout:

388fb336b0/vendor/google.golang.org/grpc/clientconn.go (L216)

This assumption is now broken, because `grpc.NewClient` doesn't do any
initial connection and defers it to the first RPC usage.

This commit passes the timeout via the `MinConnectTimeout` grpc
connection param, which will be applied to **every** connection attempt
(not just the first).

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-03-13 18:11:16 +00:00
Derek McGowan
76db0585af
Merge pull request #11529 from ningmingxiao/v2.0_fix
[release/2.0] Fix incorrect runtime name being passed to NRI
2025-03-13 23:58:57 +08:00
Craig Ingram
07a0b5419c (cherry picked from commit de1341c201ffb0effebbf51d00376181968c8779) 2025-03-11 14:52:44 +00:00
ningmingxiao
4f037050ce add name in package version
Signed-off-by: ningmingxiao <ning.mingxiao@zte.com.cn>
2025-03-11 09:31:53 +08:00
Akihiro Suda
5a3ac90a7a
Merge pull request #11514 from akhilerm/2.0-update-go1.24.1
[release/2.0] update build to go1.23.7, test go1.24.1
2025-03-10 04:20:40 +09:00
Akhil Mohan
e5ad0d0a0e
update build to go1.23.7, test go1.24.1
- go1.23.7 (released 2025-03-04) includes security fixes to the net/http
package, as well as bug fixes to cgo, the compiler, and the reflect,
runtime, and syscall packages. See the Go 1.23.7 milestone on our issue
tracker for details

- go1.24.1 (released 2025-03-04) includes security fixes to the net/http
package, as well as bug fixes to cgo, the compiler, the go command, and
the reflect, runtime, and syscall packages. See the Go 1.24.1 milestone
on our issue tracker for details.

Signed-off-by: Akhil Mohan <akhilerm@gmail.com>
2025-03-09 19:06:40 +05:30
Phil Estes
ad6934d599
Merge pull request #11506 from k8s-infra-cherrypick-robot/cherry-pick-11502-to-release/2.0
[release/2.0] docs: include note about unprivileged sysctls
2025-03-07 16:34:33 -05:00
Phil Estes
62f18de18b
Merge pull request #11503 from k8s-infra-cherrypick-robot/cherry-pick-11489-to-release/2.0
[release/2.0] e2e: use the shim bundled with containerd artifact
2025-03-07 16:05:43 -05:00
Samuel Karp
a39f1146b0 docs: include note about unprivileged sysctls
We changed the default setting for `enable_unprivileged_ports` and
`enable_unprivileged_icmp` in the CRI plugin in
https://github.com/containerd/containerd/pull/9348, but missed including
this change in the release notes.

Signed-off-by: Samuel Karp <samuelkarp@google.com>
2025-03-07 08:34:08 +00:00
Akhil Mohan
81b3384a0d e2e: use the shim bundled with containerd artifact
use the shim bundled with cri-cni-containerd tar rather than using
the shim present on the host machine for running e2e

Signed-off-by: Akhil Mohan <akhilerm@gmail.com>
2025-03-07 02:26:35 +00:00
Samuel Karp
a7f1ff94d7
Merge pull request #11497 from akhilerm/update-ltag-2.0
[release/2.0] build(deps): bump containerd/project-checks from 1.1.0 to 1.2.1
2025-03-06 10:29:25 -08:00
dependabot[bot]
7215a7d2ca
build(deps): bump containerd/project-checks from 1.1.0 to 1.2.1
Bumps [containerd/project-checks](https://github.com/containerd/project-checks) from 1.1.0 to 1.2.1.
- [Commits](434a071576...800740a80e)

---
updated-dependencies:
- dependency-name: containerd/project-checks
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
(cherry picked from commit 69c0d7f60f74210d6e41515e9064bb96362683c7)
Signed-off-by: Akhil Mohan <akhilerm@gmail.com>
2025-03-06 14:43:05 +05:30
Derek McGowan
06b99ca80c
Merge pull request #11443 from dmcgowan/prepare-v2.0.3
[release/2.0] Prepare release notes for v2.0.3
2025-02-28 10:54:00 -08:00
Derek McGowan
84e6cbafd5
Merge pull request #11457 from jsternberg/backport-remote-write-grpc-limits-exceeded
[release/2.0] Update remote content to break up writes to avoid grpc message size limits
2025-02-28 10:51:56 -08:00
Derek McGowan
b98cdb39df
Merge pull request #11456 from k8s-infra-cherrypick-robot/cherry-pick-11271-to-release/2.0
[release/2.0] Fix privileged container sysfs can't be rw because pod is ro by default
2025-02-28 10:51:43 -08:00
Jonathan A. Sternberg
eaa7ca80dc
proxy: break up writes from the remote writer to avoid grpc limits
The remote content writer proxy already has the capability to break up
large files into multiple writes, but the current API doesn't recognize
when it's about to exceed the limits and attempts to send the data over
grpc in one message instead of breaking it into multiple messages.

This changes the behavior of `Write` to automatically break up the size
of the content based on the max send message size.

Signed-off-by: Jonathan A. Sternberg <jonathan.sternberg@docker.com>
(cherry picked from commit f25f36c334144d87233e06b0de90522ebd97e144)
2025-02-28 11:29:51 -06:00
fengwei0328
c7f64196fc Fix privileged container sysfs can't be rw because pod is ro by default
Signed-off-by: fengwei0328 <feng.wei8@zte.com.cn>
2025-02-28 16:07:00 +00:00
Akihiro Suda
67bb32a8b2
Merge pull request #11430 from klihub/fixes/release/2.0.x/cdi-emfile-sigsegv
[release/2.0] go.{mod,sum}: bump CDI deps to v.0.8.1.
2025-02-27 23:52:49 +09:00
Akihiro Suda
02b70eaa9b
Merge pull request #11446 from k8s-infra-cherrypick-robot/cherry-pick-11442-to-release/2.0
[release/2.0] Prefer runtime options for PluginInfo request
2025-02-27 23:51:44 +09:00
Akihiro Suda
1bdee2c4b8
Merge pull request #11439 from k8s-infra-cherrypick-robot/cherry-pick-11433-to-release/2.0
[release/2.0] pkg: prevent oom watcher from depending on shim pkg
2025-02-27 17:46:32 +09:00
Jose Fernandez
569af34cbb Prefer runtime options for PluginInfo request
Previously, PluginInfo was called with task options as the primary
value, resulting in opts.BinaryName being omitted. Consequently, the
containerd-shim-runc-v2 fell back to the system's runc binary in the
PATH rather than the explicitly specified one. This change inverts the
option fallback by preferring runtime options over task options,
ensuring the correct binary is used for the PluginInfo request.

Closes: https://github.com/containerd/containerd/issues/11169

Signed-off-by: Jose Fernandez <josef@netflix.com>
Reviewed-by: Erikson Tung <etung@netflix.com>
2025-02-27 07:37:01 +00:00
Derek McGowan
b8dde9189d
Prepare release notes for v2.0.3
Signed-off-by: Derek McGowan <derek@mcg.dev>
2025-02-26 17:34:07 -08:00
Phil Estes
968d9452ed
Merge pull request #11436 from AkihiroSuda/cherrypick-11427-2.0
[release/2.0] CI: arm64-8core-32gb -> ubuntu-24.04-arm
2025-02-26 10:20:17 -05:00
Lei Liu
0ce93e16a9 prevent oom watcher depend on shim pkg.
Signed-off-by: Lei Liu <liulei.pt@bytedance.com>
2025-02-26 01:46:25 +00:00
Akihiro Suda
f3284aa68f
CI: arm64-8core-32gb -> ubuntu-24.04-arm
GHA now provides ARM runners for free

https://github.blog/changelog/2025-01-16-linux-arm64-hosted-runners-now-available-for-free-in-public-repositories-public-preview/

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
(cherry picked from commit 4e7484d3f40a8ec07126eb16fae614aedafe630a)
> Conflicts:
>	.github/workflows/ci.yml
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2025-02-26 10:15:20 +09:00
Krisztian Litkey
92ae2951ff
Update CDI dependency to v0.8.1.
Signed-off-by: Krisztian Litkey <krisztian.litkey@intel.com>
2025-02-25 09:39:55 +02:00
Akihiro Suda
6b4c4a19f5
Merge pull request #11403 from k8s-infra-cherrypick-robot/cherry-pick-11323-to-release/2.0
[release/2.0] Revert "Add timestamp to PodSandboxStatusResponse for kubernetes Evented PLEG"
2025-02-25 12:41:15 +09:00
Akihiro Suda
6a3f071b8b
Merge pull request #11411 from k8s-infra-cherrypick-robot/cherry-pick-11362-to-release/2.0
[release/2.0] move the device after the options when using mkfs.ext4
2025-02-21 10:57:51 +09:00
zouyee
f95a426b83 move the device after the options when using mkfs.ext4
Signed-off-by: zouyee <zouyee1989@gmail.com>
2025-02-20 07:44:00 +00:00
Maksym Pavlenko
6b5e19bdc5
Merge pull request #11410 from akhilerm/2.0-update-go1.24
[release/2.0] update build to go1.23.6, test go1.24.0
2025-02-19 09:18:17 -08:00
Akhil Mohan
4d19a6adfe
update build to go1.23.6, test go1.24.0
Signed-off-by: Akhil Mohan <akhilerm@gmail.com>
2025-02-19 20:40:03 +05:30
Samuel Karp
e7efb877ca
Merge pull request #11405 from djdongjin/release-2.0-bump-up-cache-action
[release/2.0] build(deps): bump actions/cache from 4.1.2 to 4.2.0
2025-02-18 16:48:04 -08:00
Phil Estes
67931999d8
Merge pull request #11387 from frcai/users/frcai/upgrade-x-net-33
[release/2.0] Upgrade x/net to 0.33.0 to fix vulnerability GHSA-w32m-9786-jp63
2025-02-18 16:40:13 -05:00
dependabot[bot]
c738c3aabc build(deps): bump actions/cache from 4.1.2 to 4.2.0
Bumps [actions/cache](https://github.com/actions/cache) from 4.1.2 to 4.2.0.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](6849a64899...1bd1e32a3b)

---
updated-dependencies:
- dependency-name: actions/cache
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
(cherry picked from commit 9270122437f5a0105c74b49089fddc1a2c2648af)
Signed-off-by: Jin Dong <djdongjin95@gmail.com>
2025-02-18 20:26:38 +00:00
Chris Henzie
b5313993c1 Revert "Add timestamp to PodSandboxStatusResponse for kubernetes Evented PLEG"
This reverts commit b5290726d2.

Signed-off-by: Chris Henzie <chrishenzie@google.com>
2025-02-18 15:31:16 +00:00
Akihiro Suda
6b5df746e4
Merge pull request #11357 from k8s-infra-cherrypick-robot/cherry-pick-11019-to-release/2.0
[release/2.0] Update install-imgcrypt to allow change install repo
2025-02-18 19:03:14 +09:00