Commit Graph

14662 Commits

Author SHA1 Message Date
90d73c9e88 Ignore reading-only judgment to support CDI volume
Downgrade log level for task exit.
2025-06-10 11:22:13 +08:00
Shiming Zhang
a3c777afd1 Add OCI/Image Volume Source support
Signed-off-by: Shiming Zhang <wzshiming@hotmail.com>
2025-06-05 10:21:04 +08:00
Brad Davidson
890953d3c6
Enable btrfs/fuse-overlayfs/stargz snapshotter plugins
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2025-05-06 22:38:41 +00:00
Brad Davidson
f660f4424f
Add rewrite support to hosts.toml loader
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2025-05-06 22:38:14 +00:00
Jacob Blain Christen
ba6b205d0f
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-05-06 22:38:14 +00:00
Brad Davidson
676ba43ad3
Remove GRPC metrics
These conflict with other GRPC servers when running embedded

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2025-05-06 22:38:14 +00:00
ningmingxiao
b9ab7a3f49
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-05-06 22:38:13 +00:00
Maksym Pavlenko
fb4c30d4ed
Merge pull request #11717 from dmcgowan/backport-go-1.23.8
[release/2.0] Update go to 1.23.8
2025-04-17 12:39:09 -07:00
Maksym Pavlenko
d60230c0a2
Merge pull request #11713 from dmcgowan/prepare-v2.0.5
[release/2.0] Prepare release notes for v2.0.5
2025-04-17 12:37:45 -07:00
Akhil Mohan
5bcf0a95e3
use go1.23.8 as the default go version
use go1.23.8 as the default go version for running in CI and making
release binaries.

Signed-off-by: Akhil Mohan <akhilerm@gmail.com>
(cherry picked from commit 6f93c65f52c9e1c5e25595429fd50ce2e5da6843)
Signed-off-by: Derek McGowan <derek@mcg.dev>
2025-04-17 11:18:09 -07:00
Akhil Mohan
4838f33f7e
update to go 1.24.2, 1.23.8
- go1.23.8 (released 2025-04-01) includes security fixes to the net/http
  package, as well as bug fixes to the runtime and the go command.
  Ref: https://github.com/golang/go/issues?q=milestone%3AGo1.23.8+label%3ACherryPickApproved
- go1.24.2 (released 2025-04-01) includes security fixes to the net/http
  package, as well as bug fixes to the compiler, the runtime, the go
  command, and the crypto/tls, go/types, net/http, and testing packages.
  Ref: https://github.com/golang/go/issues?q=milestone%3AGo1.24.2+label%3ACherryPickApproved

Signed-off-by: Akhil Mohan <akhilerm@gmail.com>
(cherry picked from commit 5629e9fff7de69a36f5f563d41966aa562866258)
Signed-off-by: Derek McGowan <derek@mcg.dev>
2025-04-17 11:18:09 -07:00
Derek McGowan
a8082cd60d
Prepare release notes for v2.0.5
Signed-off-by: Derek McGowan <derek@mcg.dev>
2025-04-16 21:55:18 -07:00
Phil Estes
ab513cdec2
Merge pull request #11710 from dmcgowan/backport-11707
[release/2.0] Disable criu test on arm64
2025-04-16 20:59:16 -04:00
Phil Estes
58b715ad8d
Disable arm64 criu testing in GH Actions
Due to current 100% failure rate on arm64 with the current OS image, disable criu testing for now

Signed-off-by: Phil Estes <estesp@amazon.com>
(cherry picked from commit 9ca6a7ee0aa0ea8added551dd16e00b2102fdea4)
Signed-off-by: Derek McGowan <derek@mcg.dev>
2025-04-16 16:17:25 -07:00
Akhil Mohan
b4a53e8264
disable portmap test in ubuntu-22 to make CI happy
Signed-off-by: Akhil Mohan <akhilerm@gmail.com>
(cherry picked from commit 338e0a1266302fed4b52a852735b90a832ad2b0f)
(cherry picked from commit 70db1bd00fb5db7c3958da4aefac0c41c89bb654)
Signed-off-by: Derek McGowan <derek@mcg.dev>
2025-04-16 16:15:12 -07:00
Akhil Mohan
4bcf472de6
add option to skip tests in critest
Signed-off-by: Akhil Mohan <akhilerm@gmail.com>
(cherry picked from commit 4ba3d82ca270937a428d4b6c006bd7e9f8261743)
(cherry picked from commit 8e6c93b6b057230915b449349836bf198f8ebcfe)
Signed-off-by: Derek McGowan <derek@mcg.dev>
2025-04-16 16:14:51 -07:00
Derek McGowan
ea7be04cb4
Merge pull request #11698 from k8s-infra-cherrypick-robot/cherry-pick-11670-to-release/2.0
[release/2.0] Prevent panic on zero length push
2025-04-16 08:57:13 +08:00
Derek McGowan
ebd9a50325
Merge pull request #11688 from estesp/cp-11641
[release/2.0] backport: Set default differ for the default unpack config of transfer service
2025-04-16 08:56:47 +08:00
Derek McGowan
ff47757ae4
Merge pull request #11703 from k8s-infra-cherrypick-robot/cherry-pick-11479-to-release/2.0
[release/2.0] ci: update GitHub Actions release runner to ubuntu-24.04
2025-04-16 08:53:11 +08:00
Austin Vazquez
b184a97d30 ci: update GitHub Actions release runner to ubuntu-24.04
Signed-off-by: Austin Vazquez <macedonv@amazon.com>
2025-04-16 00:16:49 +00:00
Cesar Talledo
8a638b71ae Prevent panic in Docker pusher.
Prevent a panic in the Docker pusher pushWriter, by checking that
the pipe is non nil before attempting to use it.

The panic was found by Moby issue #46746 (https://github.com/moby/moby/issues/46746).
With this fix the panic no longer reproduces.

Signed-off-by: Cesar Talledo <cesar.talledo@docker.com>
2025-04-14 21:25:41 +00:00
Henry Wang
84d9658c36
Set default differ for the default unpack config of transfer service
Signed-off-by: Henry Wang <henwang@amazon.com>
(cherry picked from commit a083b669c9412eef55ee103fe2bb1dec7c6178bc)
2025-04-11 12:09:53 -04:00
Fu Wei
9e97c2e626
Merge pull request #11621 from k8s-infra-cherrypick-robot/cherry-pick-11475-to-release/2.0
[release/2.0] fix: call checkCopyShimLogError(shimCtx) to avoid expected error log flood
2025-03-28 19:12:21 -04:00
yylt
e04543db09 use shimCtx for fifo copy
Signed-off-by: yylt <yang8518296@163.com>
2025-03-28 20:28:58 +00:00
Fu Wei
a5b872b5c8
Merge pull request #11618 from k8s-infra-cherrypick-robot/cherry-pick-11569-to-release/2.0
[release/2.0] update taskOptions based on runtimeOptions when creating a task
2025-03-28 15:24:53 -04:00
Iceber Gu
9f46e7a449 integration/client: add tests for TaskOptions is not empty
Co-authored-by: Wei Fu <fuweid89@gmail.com>
Signed-off-by: Iceber Gu <caiwei95@hotmail.com>
2025-03-28 18:33:13 +00:00
Iceber Gu
8a16a6a04a prefer task options for PluginInfo request
Signed-off-by: Iceber Gu <caiwei95@hotmail.com>
2025-03-28 18:33:13 +00:00
Iceber Gu
a183b2d232 update taskOptions based on runtimeOptions when creating a task
Signed-off-by: Iceber Gu <caiwei95@hotmail.com>
2025-03-28 18:33:13 +00:00
Fu Wei
c146996f3f
Merge pull request #11599 from k8s-infra-cherrypick-robot/cherry-pick-11581-to-release/2.0
[release/2.0] *: CRIImageService should delete image synchronously
2025-03-25 09:47:53 -04:00
Wei Fu
091143135b *: CRIImageService should delete image synchronously
Use memory service instead of metadata store.

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2025-03-25 02:36:45 +00:00
Phil Estes
148fbbb92f
Merge pull request #11583 from k8s-infra-cherrypick-robot/cherry-pick-11560-to-release/2.0
[release/2.0] Update runc binary to v1.2.6
2025-03-24 16:16:45 +01:00
Austin Vazquez
c2372c072c Update runc binary to v1.2.6
Signed-off-by: Austin Vazquez <macedonv@amazon.com>
2025-03-22 18:53:57 +00:00
Akihiro Suda
ceb33770d2
Merge pull request #11566 from klihub/2.0/deps/bump-cdi-version
[release/2.0] go.{mod,sum}: bump CDI deps to stable v1.0.0.
2025-03-20 02:57:31 +09:00
Phil Estes
c0d93d20be
Merge pull request #11571 from AkihiroSuda/dev-2.0
[release/2.0] silence govulncheck false positives
2025-03-19 17:58:09 +01:00
Krisztian Litkey
e8506511b2
go.{mod,sum}: bump CDI deps to stable v1.0.0.
Signed-off-by: Krisztian Litkey <krisztian.litkey@intel.com>
2025-03-19 17:29:35 +02:00
Akihiro Suda
4cfb89430c
go.mod: github.com/go-jose/go-jose/v4
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2025-03-19 23:00:47 +09:00
Akihiro Suda
2b9e6a29d7
go.mod: golang.org/x/oauth2 v0.28.0
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2025-03-19 23:00:20 +09:00
Akihiro Suda
6df1ea0d9e
go.mod: golang.org/x/net v0.37.0
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2025-03-19 22:59:07 +09:00
Akihiro Suda
dcd661b138
Merge pull request #11567 from klihub/fixes/2.0/ci-lint-errors
[release/2.0] Fix CI lint error (cherry-picked #11555)
2025-03-19 22:49:23 +09:00
Jin Dong
16f20abdff
Fix CI lint error
Signed-off-by: Jin Dong <djdongjin95@gmail.com>
(cherry picked from commit c8effff1a823bed757194584a80a043c3a69da1a)
2025-03-19 11:35:45 +02: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