Skip to content

Commit

Permalink
feat: update containerd to v2.0.0
Browse files Browse the repository at this point in the history
Include the patch containerd/containerd#10917

See siderolabs/talos#9594

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
  • Loading branch information
smira committed Nov 6, 2024
1 parent 20e1e08 commit 9a98f73
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Pkgfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ vars:
cni_sha512: a967dcaedb595bad25e0643aba50b35fb850b5893518829951ba5622d195ab309a3a489c9eb9ff8ad1df9ad0244c05434143f564ea27c4d04f27e1c5be240554

# renovate: datasource=github-tags depName=containerd/containerd
containerd_version: v2.0.0-rc.6
containerd_ref: b70cce2085802e9e166ed8d92b42058c550f9ca3
containerd_sha256: 8ea2934e5f8abcd70e35bb32ae6268ee64e2ea189d9c98584126a36f35046b48
containerd_sha512: f0b09e49e25355170cbf673c5acaaa43d969330c1ab707ade7bfa5576e43b1adb01c5138d698d250502c9886d5a327bd75dab57137161b35f0da99bf572165c6
containerd_version: v2.0.0
containerd_ref: 207ad711eabd375a01713109a8a197d197ff6542
containerd_sha256: 346d644e1b96e1f4a39bfe9d1eb0eb01ca676f806c12d95e5dbe35325bbc1780
containerd_sha512: b1a89c4c53db2c69757bc40d90d585e2662ab4fffb28acb904f9710b281a9f22273ecdbab49250b229bf95b29cf1a33a352afb81967db7580ae209a83c5fb2ea

# renovate: datasource=git-tags extractVersion=^v(?<version>.*)$ depName=git://git.kernel.org/pub/scm/utils/cryptsetup/cryptsetup.git
cryptsetup_version: 2.7.5
Expand Down
39 changes: 39 additions & 0 deletions containerd/patches/sandbox-image-pull.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
See https://github.com/containerd/containerd/pull/10917

From 11b1353c12b9f3a1542ffe44a00a988e330f8c56 Mon Sep 17 00:00:00 2001
From: Andrey Smirnov <andrey.smirnov@siderolabs.com>
Date: Tue, 29 Oct 2024 20:42:02 +0400
Subject: [PATCH] fix: set the credentials even if not provided

Fixes #10916

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
---
internal/cri/server/images/image_pull.go | 14 ++++++++++++++
1 file changed, 14 insertions(+)

diff --git a/internal/cri/server/images/image_pull.go b/internal/cri/server/images/image_pull.go
index e59b88b4f248..de8445932a11 100644
--- a/internal/cri/server/images/image_pull.go
+++ b/internal/cri/server/images/image_pull.go
@@ -133,6 +133,20 @@ func (c *CRIImageService) PullImage(ctx context.Context, name string, credential
defer inProgressImagePulls.Dec()
startTime := time.Now()

+ if credentials == nil {
+ credentials = func(host string) (string, string, error) {
+ var hostauth *runtime.AuthConfig
+
+ config := c.config.Registry.Configs[host]
+ if config.Auth != nil {
+ hostauth = toRuntimeAuthConfig(*config.Auth)
+
+ }
+
+ return ParseAuth(hostauth, host)
+ }
+ }
+
namedRef, err := distribution.ParseDockerRef(name)
if err != nil {
return "", fmt.Errorf("failed to parse image reference %q: %w", name, err)
2 changes: 2 additions & 0 deletions containerd/pkg.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ steps:
prepare:
- |
tar -xzf containerd.tar.gz --strip-components=1
patch -p1 < /pkg/patches/sandbox-image-pull.patch
build:
- |
make VERSION={{ .containerd_version }} REVISION={{ .containerd_ref }}
Expand Down

0 comments on commit 9a98f73

Please sign in to comment.