treewide: bump k8s to v0.34.1
Change-Id: Ie3b1296ac4788aa27aaa2985c72da6c56ea3d281
Reviewed-on: https://review.monogon.dev/c/monogon/+/4626
Reviewed-by: Lorenz Brun <lorenz@monogon.tech>
Tested-by: Jenkins CI
diff --git a/third_party/com_github_containerd_containerd_v2/add-unimplemented-functions.patch b/third_party/com_github_containerd_containerd_v2/add-unimplemented-functions.patch
deleted file mode 100644
index d182968..0000000
--- a/third_party/com_github_containerd_containerd_v2/add-unimplemented-functions.patch
+++ /dev/null
@@ -1,59 +0,0 @@
-Add unimplemented function for CRI compat.
-
-
-diff --git a/internal/cri/instrument/instrumented_service.go b/internal/cri/instrument/instrumented_service.go
---- a/internal/cri/instrument/instrumented_service.go
-+++ b/internal/cri/instrument/instrumented_service.go
-@@ -17,8 +17,9 @@
- package instrument
-
- import (
- "context"
-+ "errors"
-
- "github.com/containerd/errdefs"
- "github.com/containerd/errdefs/pkg/errgrpc"
- "github.com/containerd/log"
-@@ -641,4 +642,8 @@
- }()
- res, err = in.c.RuntimeConfig(ctx, r)
- return res, errgrpc.ToGRPC(err)
- }
-+
-+func (in *instrumentedService) UpdatePodSandboxResources(ctx context.Context, r *runtime.UpdatePodSandboxResourcesRequest) (res *runtime.UpdatePodSandboxResourcesResponse, err error) {
-+ return nil, errors.New("not implemented yet")
-+}
-diff --git a/internal/cri/server/sandbox_update_resources.go b/internal/cri/server/sandbox_update_resources.go
-new file mode 100644
-index 000000000000..0fcd2c7c566c
---- /dev/null
-+++ b/internal/cri/server/sandbox_update_resources.go
-@@ -0,0 +1,28 @@
-+/*
-+ Copyright The containerd Authors.
-+
-+ Licensed under the Apache License, Version 2.0 (the "License");
-+ you may not use this file except in compliance with the License.
-+ You may obtain a copy of the License at
-+
-+ http://www.apache.org/licenses/LICENSE-2.0
-+
-+ Unless required by applicable law or agreed to in writing, software
-+ distributed under the License is distributed on an "AS IS" BASIS,
-+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-+ See the License for the specific language governing permissions and
-+ limitations under the License.
-+*/
-+
-+package server
-+
-+import (
-+ "context"
-+ "errors"
-+
-+ runtime "k8s.io/cri-api/pkg/apis/runtime/v1"
-+)
-+
-+func (c *criService) UpdatePodSandboxResources(ctx context.Context, r *runtime.UpdatePodSandboxResourcesRequest) (*runtime.UpdatePodSandboxResourcesResponse, error) {
-+ return nil, errors.New("not implemented yet")
-+}
diff --git a/third_party/com_github_containerd_containerd_v2/client-go-0-34-compat.patch b/third_party/com_github_containerd_containerd_v2/client-go-0-34-compat.patch
new file mode 100644
index 0000000..421e07a
--- /dev/null
+++ b/third_party/com_github_containerd_containerd_v2/client-go-0-34-compat.patch
@@ -0,0 +1,112 @@
+Add unimplemented function for CRI compat.
+
+diff --git a/internal/cri/server/images/service.go b/internal/cri/server/images/service.go
+index cd1f16694f67..ddfd1c610c52 100644
+--- a/internal/cri/server/images/service.go
++++ b/internal/cri/server/images/service.go
+@@ -51,6 +51,8 @@ type ImagePlatform struct {
+ }
+
+ type CRIImageService struct {
++ runtime.UnimplementedImageServiceServer
++
+ // config contains all image configurations.
+ config criconfig.ImageConfig
+ // images is the lower level image store used for raw storage,
+diff --git a/internal/cri/server/service.go b/internal/cri/server/service.go
+index a028794d9611..69482ec37096 100644
+--- a/internal/cri/server/service.go
++++ b/internal/cri/server/service.go
+@@ -111,6 +111,9 @@ type ImageService interface {
+
+ // criService implements CRIService.
+ type criService struct {
++ runtime.UnimplementedRuntimeServiceServer
++ runtime.UnimplementedImageServiceServer
++
+ RuntimeService
+ ImageService
+ // config contains all configurations.
+diff --git a/internal/cri/instrument/instrumented_service.go b/internal/cri/instrument/instrumented_service.go
+--- a/internal/cri/instrument/instrumented_service.go
++++ b/internal/cri/instrument/instrumented_service.go
+@@ -43,8 +43,11 @@
+ }
+
+ // instrumentedService wraps service with containerd namespace and logs.
+ type instrumentedService struct {
++ runtime.UnimplementedRuntimeServiceServer
++ runtime.UnimplementedImageServiceServer
++
+ c criService
+ }
+
+ func NewService(c criService) GRPCServices {
+diff --git a/internal/cri/server/images/image_list_test.go b/internal/cri/server/images/image_list_test.go
+index fd046183f82b..701359d33d6f 100644
+--- a/internal/cri/server/images/image_list_test.go
++++ b/internal/cri/server/images/image_list_test.go
+@@ -79,21 +79,21 @@ func TestListImages(t *testing.T) {
+ Id: "sha256:1123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef",
+ RepoTags: []string{"gcr.io/library/busybox:latest"},
+ RepoDigests: []string{"gcr.io/library/busybox@sha256:e6693c20186f837fc393390135d8a598a96a833917917789d63766cab6c59582"},
+- Size_: uint64(1000),
++ Size: uint64(1000),
+ Username: "root",
+ },
+ {
+ Id: "sha256:2123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef",
+ RepoTags: []string{"gcr.io/library/alpine:latest"},
+ RepoDigests: []string{"gcr.io/library/alpine@sha256:e6693c20186f837fc393390135d8a598a96a833917917789d63766cab6c59582"},
+- Size_: uint64(2000),
++ Size: uint64(2000),
+ Uid: &runtime.Int64Value{Value: 1234},
+ },
+ {
+ Id: "sha256:3123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef",
+ RepoTags: []string{"gcr.io/library/ubuntu:latest"},
+ RepoDigests: []string{"gcr.io/library/ubuntu@sha256:e6693c20186f837fc393390135d8a598a96a833917917789d63766cab6c59582"},
+- Size_: uint64(3000),
++ Size: uint64(3000),
+ Username: "nobody",
+ },
+ }
+diff --git a/internal/cri/server/images/image_status.go b/internal/cri/server/images/image_status.go
+index 4f1ece5b43a7..0b3dc3c21129 100644
+--- a/internal/cri/server/images/image_status.go
++++ b/internal/cri/server/images/image_status.go
+@@ -66,7 +66,7 @@ func toCRIImage(image imagestore.Image) *runtime.Image {
+ Id: image.ID,
+ RepoTags: repoTags,
+ RepoDigests: repoDigests,
+- Size_: uint64(image.Size),
++ Size: uint64(image.Size),
+ Pinned: image.Pinned,
+ }
+ uid, username := getUserFromImage(image.ImageSpec.Config.User)
+diff --git a/internal/cri/server/images/image_status_test.go b/internal/cri/server/images/image_status_test.go
+index 36779130b8b8..cd9268cb92d3 100644
+--- a/internal/cri/server/images/image_status_test.go
++++ b/internal/cri/server/images/image_status_test.go
+@@ -48,7 +48,7 @@ func TestImageStatus(t *testing.T) {
+ Id: testID,
+ RepoTags: []string{"gcr.io/library/busybox:latest"},
+ RepoDigests: []string{"gcr.io/library/busybox@sha256:e6693c20186f837fc393390135d8a598a96a833917917789d63766cab6c59582"},
+- Size_: uint64(1234),
++ Size: uint64(1234),
+ Username: "user",
+ }
+
+diff --git a/integration/remote/remote_image.go b/integration/remote/remote_image.go
+index 0ae6196732ed..e9f1653149b2 100644
+--- a/integration/remote/remote_image.go
++++ b/integration/remote/remote_image.go
+@@ -107,7 +107,7 @@ func (r *ImageService) ImageStatus(image *runtimeapi.ImageSpec, opts ...grpc.Cal
+ }
+
+ if resp.Image != nil {
+- if resp.Image.Id == "" || resp.Image.Size() == 0 {
++ if resp.Image.Id == "" || resp.Image.Size == 0 {
+ errorMessage := fmt.Sprintf("Id or size of image %q is not set", image.Image)
+ log.L.Errorf("ImageStatus failed: %s", errorMessage)
+ return nil, errors.New(errorMessage)
\ No newline at end of file