treewide: k8s 1.28 and lots related updates
First, this contains a bunch of dependency updates. Important ones in no
particular order:
Kubernetes 1.24.2 -> 1.28.8
etcd 3.5.4 -> 3.5.13
Protobuf 1.32.0 -> 1.33.0
OpenTelemetry 0.20.0 -> 1.20.0
containerd 1.6.6 -> 1.7.15
CoreDNS 1.9.2 -> 1.11.1
With Kubernetes 1.25 PodSecurityPolicies are removed, this replaces them
with a static PodSecurity admission configuration which behaves the same
or is slightly more permissive in most ways. Only known exceptions are
that NET_RAW is no longer an allowed permission and non-standard SELinux
labels are no longer permitted (but these never did anything anyways).
The RBAC policies are intentionally not removed yet as we do not yet
have the capability to actually update these, so they will be removed
when that is available (#288), until then they will stay in-place but
do nothing.
With the containerd upgrade the deprecated option for ignoring
preseeded/pinned images for garbage collection in Kubelet can be
removed.
This change also contains some drive-by fixes to the controller-manager,
like passing the Service IP net and disabling cloud-related control
loops which generate spurious warnings if enabled.
The containerd tracing patch is removed as we can now use OTel v1, thus
that patch is no longer necessary.
An actual upgrade test will be part of a future CL as this one is
already quite large and it works stand-alone.
Co-authored-by: Tim Windelschmidt <tim@monogon.tech>
Change-Id: I8e5f51e6e6240a1b67590458b2f1c24d58c8e91e
Reviewed-on: https://review.monogon.dev/c/monogon/+/2315
Tested-by: Jenkins CI
Reviewed-by: Tim Windelschmidt <tim@monogon.tech>
diff --git a/third_party/go/patches/containerd-grpc-inherit-unimplemented.patch b/third_party/go/patches/containerd-grpc-inherit-unimplemented.patch
new file mode 100644
index 0000000..3568b79
--- /dev/null
+++ b/third_party/go/patches/containerd-grpc-inherit-unimplemented.patch
@@ -0,0 +1,54 @@
+From d65088ac138e652772c73ce2b19be03b1966c42a Mon Sep 17 00:00:00 2001
+From: Lorenz Brun <lorenz@monogon.tech>
+Date: Tue, 28 Nov 2023 18:05:11 +0100
+Subject: [PATCH] Use Unimplemented implementation for gRPC forward compat
+
+Otherwise any newly-added methods will cause build failures.
+---
+ pkg/cri/instrument/instrumented_service.go | 2 ++
+ pkg/cri/sbserver/service.go | 2 ++
+ pkg/cri/server/service.go | 2 ++
+ 3 files changed, 6 insertions(+)
+
+diff --git a/pkg/cri/instrument/instrumented_service.go b/pkg/cri/instrument/instrumented_service.go
+index 2f388d56d..ce290559c 100644
+--- a/pkg/cri/instrument/instrumented_service.go
++++ b/pkg/cri/instrument/instrumented_service.go
+@@ -61,6 +61,8 @@ type GRPCAlphaServices interface {
+ // instrumentedService wraps service with containerd namespace and logs.
+ type instrumentedService struct {
+ c criService
++ runtime.UnimplementedRuntimeServiceServer
++ runtime.UnimplementedImageServiceServer
+ }
+
+ func NewService(c criService) GRPCServices {
+diff --git a/pkg/cri/sbserver/service.go b/pkg/cri/sbserver/service.go
+index 9348c6081..9b636aaf8 100644
+--- a/pkg/cri/sbserver/service.go
++++ b/pkg/cri/sbserver/service.go
+@@ -72,6 +72,8 @@ type CRIService interface {
+
+ // criService implements CRIService.
+ type criService struct {
++ runtime.UnimplementedRuntimeServiceServer
++ runtime.UnimplementedImageServiceServer
+ // config contains all configurations.
+ config criconfig.Config
+ // imageFSPath is the path to image filesystem.
+diff --git a/pkg/cri/server/service.go b/pkg/cri/server/service.go
+index 5d946f4a2..b56509534 100644
+--- a/pkg/cri/server/service.go
++++ b/pkg/cri/server/service.go
+@@ -70,6 +70,8 @@ type CRIService interface {
+
+ // criService implements CRIService.
+ type criService struct {
++ runtime.UnimplementedRuntimeServiceServer
++ runtime.UnimplementedImageServiceServer
+ // config contains all configurations.
+ config criconfig.Config
+ // imageFSPath is the path to image filesystem.
+--
+2.42.0
+