From e56a7f65808b90058df16a4133f19484beeedc31 Mon Sep 17 00:00:00 2001 From: Andrey Smirnov Date: Wed, 30 Oct 2024 18:29:51 +0400 Subject: [PATCH] fix: update deprecations based on Kubernetes 1.32.0-alpha.3 Also rekres/bump. Signed-off-by: Andrey Smirnov --- Dockerfile | 6 +++--- Makefile | 6 +++--- go.mod | 14 +++++++------- go.sum | 28 ++++++++++++++-------------- kubernetes/manifests/get.go | 6 ++---- kubernetes/upgrade/checks.go | 8 +++++++- 6 files changed, 36 insertions(+), 32 deletions(-) diff --git a/Dockerfile b/Dockerfile index f0c796a..4acf82c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,7 +2,7 @@ # THIS FILE WAS AUTOMATICALLY GENERATED, PLEASE DO NOT EDIT. # -# Generated on 2024-10-16T10:10:47Z by kres 34e72ac. +# Generated on 2024-10-30T14:25:32Z by kres 6d3cad4. ARG TOOLCHAIN @@ -10,9 +10,9 @@ ARG TOOLCHAIN FROM scratch AS generate # runs markdownlint -FROM docker.io/oven/bun:1.1.29-alpine AS lint-markdown +FROM docker.io/oven/bun:1.1.32-alpine AS lint-markdown WORKDIR /src -RUN bun i markdownlint-cli@0.41.0 sentences-per-line@0.2.1 +RUN bun i markdownlint-cli@0.42.0 sentences-per-line@0.2.1 COPY .markdownlint.json . COPY ./README.md ./README.md RUN bunx markdownlint --ignore "CHANGELOG.md" --ignore "**/node_modules/**" --ignore '**/hack/chglog/**' --rules node_modules/sentences-per-line/index.js . diff --git a/Makefile b/Makefile index e1a621c..f2fe272 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ # THIS FILE WAS AUTOMATICALLY GENERATED, PLEASE DO NOT EDIT. # -# Generated on 2024-10-16T10:10:47Z by kres 34e72ac. +# Generated on 2024-10-30T14:25:32Z by kres 6d3cad4. # common variables @@ -17,11 +17,11 @@ WITH_RACE ?= false REGISTRY ?= ghcr.io USERNAME ?= siderolabs REGISTRY_AND_USERNAME ?= $(REGISTRY)/$(USERNAME) -PROTOBUF_GO_VERSION ?= 1.34.2 +PROTOBUF_GO_VERSION ?= 1.35.1 GRPC_GO_VERSION ?= 1.5.1 GRPC_GATEWAY_VERSION ?= 2.22.0 VTPROTOBUF_VERSION ?= 0.6.0 -GOIMPORTS_VERSION ?= 0.25.0 +GOIMPORTS_VERSION ?= 0.26.0 DEEPCOPY_VERSION ?= v0.5.6 GOLANGCILINT_VERSION ?= v1.61.0 GOFUMPT_VERSION ?= v0.7.0 diff --git a/go.mod b/go.mod index e95fd19..768de3e 100644 --- a/go.mod +++ b/go.mod @@ -4,17 +4,17 @@ go 1.23.2 require ( github.com/blang/semver/v4 v4.0.0 - github.com/cosi-project/runtime v0.5.5 + github.com/cosi-project/runtime v0.6.4 github.com/google/go-containerregistry v0.20.2 github.com/hexops/gotextdiff v1.0.3 - github.com/siderolabs/gen v0.5.0 + github.com/siderolabs/gen v0.6.1 github.com/siderolabs/go-retry v0.3.3 - github.com/siderolabs/talos/pkg/machinery v1.8.1 + github.com/siderolabs/talos/pkg/machinery v1.8.2 github.com/stretchr/testify v1.9.0 golang.org/x/sys v0.26.0 - k8s.io/api v0.31.1 - k8s.io/apimachinery v0.31.1 - k8s.io/client-go v0.31.1 + k8s.io/api v0.31.2 + k8s.io/apimachinery v0.31.2 + k8s.io/client-go v0.31.2 sigs.k8s.io/yaml v1.4.0 ) @@ -55,7 +55,7 @@ require ( github.com/pkg/errors v0.9.1 // indirect github.com/planetscale/vtprotobuf v0.6.1-0.20240319094008-0393e58bdf10 // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect - github.com/siderolabs/crypto v0.4.4 // indirect + github.com/siderolabs/crypto v0.5.0 // indirect github.com/siderolabs/go-api-signature v0.3.6 // indirect github.com/siderolabs/go-pointer v1.0.0 // indirect github.com/siderolabs/protoenc v0.2.1 // indirect diff --git a/go.sum b/go.sum index 1238d2d..614f142 100644 --- a/go.sum +++ b/go.sum @@ -21,8 +21,8 @@ github.com/containerd/go-cni v1.1.10 h1:c2U73nld7spSWfiJwSh/8W9DK+/qQwYM2rngIhCy github.com/containerd/go-cni v1.1.10/go.mod h1:/Y/sL8yqYQn1ZG1om1OncJB1W4zN3YmjfP/ShCzG/OY= github.com/containernetworking/cni v1.2.3 h1:hhOcjNVUQTnzdRJ6alC5XF+wd9mfGIUaj8FuJbEslXM= github.com/containernetworking/cni v1.2.3/go.mod h1:DuLgF+aPd3DzcTQTtp/Nvl1Kim23oFKdm2okJzBQA5M= -github.com/cosi-project/runtime v0.5.5 h1:GFoHnngpg4QVZluAUDwUbCe/sYOYBXKULxL/6DD99pU= -github.com/cosi-project/runtime v0.5.5/go.mod h1:m+bkfUzKYeUyoqYAQBxdce3bfgncG8BsqcbfKRbvJKs= +github.com/cosi-project/runtime v0.6.4 h1:roifc5e+Q1+72EI36BYSRT9aXyskU+coiKHeoBBWkMg= +github.com/cosi-project/runtime v0.6.4/go.mod h1:EMLs8a55tJ6zA4UyDbRsTvXBd6UIlNwZfCVGvCyiXK8= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -131,10 +131,10 @@ github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= github.com/ryanuber/go-glob v1.0.0 h1:iQh3xXAumdQ+4Ufa5b25cRpC5TYKlno6hsv6Cb3pkBk= github.com/ryanuber/go-glob v1.0.0/go.mod h1:807d1WSdnB0XRJzKNil9Om6lcp/3a0v4qIHxIXzX/Yc= -github.com/siderolabs/crypto v0.4.4 h1:Q6EDBMR2Ub2oAZW5Xl8lrKB27bM3Sn8Gkfw3rngco5U= -github.com/siderolabs/crypto v0.4.4/go.mod h1:hsR3tJ3aaeuhCChsLF4dBd9vlJVPvmhg4vvx2ez4aD4= -github.com/siderolabs/gen v0.5.0 h1:Afdjx+zuZDf53eH5DB+E+T2JeCwBXGinV66A6osLgQI= -github.com/siderolabs/gen v0.5.0/go.mod h1:1GUMBNliW98Xeq8GPQeVMYqQE09LFItE8enR3wgMh3Q= +github.com/siderolabs/crypto v0.5.0 h1:+Sox0aYLCcD0PAH2cbEcx557zUrONLtuj1Ws+2MFXGc= +github.com/siderolabs/crypto v0.5.0/go.mod h1:hsR3tJ3aaeuhCChsLF4dBd9vlJVPvmhg4vvx2ez4aD4= +github.com/siderolabs/gen v0.6.1 h1:Mex6Q41Tlw3e+4cGvlju2x4UwULD5WMo/D82n7IxV0Y= +github.com/siderolabs/gen v0.6.1/go.mod h1:an3a2Y53O7kUjnnK8Bfu3gewtvnIOu5RTU6HalFtXQQ= github.com/siderolabs/go-api-signature v0.3.6 h1:wDIsXbpl7Oa/FXvxB6uz4VL9INA9fmr3EbmjEZYFJrU= github.com/siderolabs/go-api-signature v0.3.6/go.mod h1:hoH13AfunHflxbXfh+NoploqV13ZTDfQ1mQJWNVSW9U= github.com/siderolabs/go-blockdevice v0.4.7 h1:2bk4WpEEflGxjrNwp57ye24Pr+cYgAiAeNMWiQOuWbQ= @@ -149,8 +149,8 @@ github.com/siderolabs/net v0.4.0 h1:1bOgVay/ijPkJz4qct98nHsiB/ysLQU0KLoBC4qLm7I= github.com/siderolabs/net v0.4.0/go.mod h1:/ibG+Hm9HU27agp5r9Q3eZicEfjquzNzQNux5uEk0kM= github.com/siderolabs/protoenc v0.2.1 h1:BqxEmeWQeMpNP3R6WrPqDatX8sM/r4t97OP8mFmg6GA= github.com/siderolabs/protoenc v0.2.1/go.mod h1:StTHxjet1g11GpNAWiATgc8K0HMKiFSEVVFOa/H0otc= -github.com/siderolabs/talos/pkg/machinery v1.8.1 h1:oeJQmkLNjEG5jxrzPiC2XMQS5dcg1qZ17p5LKcaCbRM= -github.com/siderolabs/talos/pkg/machinery v1.8.1/go.mod h1:mWTmuUk8G6CdkhUfDmsrIkgPo0G6J5hC/zGazgnyzBg= +github.com/siderolabs/talos/pkg/machinery v1.8.2 h1:oBNBIPjOo6SNvVaUb4B4PHGefR6HYgYVl1/GPGppj98= +github.com/siderolabs/talos/pkg/machinery v1.8.2/go.mod h1:cNR2TELu2T9AzYOHAoNr/7ZS3ZVDLzM/KnuOr4XW4s4= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/stoewer/go-strcase v1.2.0 h1:Z2iHWqGXH00XYgqDmNgQbIBxf3wrNq0F3feEy0ainaU= @@ -278,12 +278,12 @@ gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -k8s.io/api v0.31.1 h1:Xe1hX/fPW3PXYYv8BlozYqw63ytA92snr96zMW9gWTU= -k8s.io/api v0.31.1/go.mod h1:sbN1g6eY6XVLeqNsZGLnI5FwVseTrZX7Fv3O26rhAaI= -k8s.io/apimachinery v0.31.1 h1:mhcUBbj7KUjaVhyXILglcVjuS4nYXiwC+KKFBgIVy7U= -k8s.io/apimachinery v0.31.1/go.mod h1:rsPdaZJfTfLsNJSQzNHQvYoTmxhoOEofxtOsF3rtsMo= -k8s.io/client-go v0.31.1 h1:f0ugtWSbWpxHR7sjVpQwuvw9a3ZKLXX0u0itkFXufb0= -k8s.io/client-go v0.31.1/go.mod h1:sKI8871MJN2OyeqRlmA4W4KM9KBdBUpDLu/43eGemCg= +k8s.io/api v0.31.2 h1:3wLBbL5Uom/8Zy98GRPXpJ254nEFpl+hwndmk9RwmL0= +k8s.io/api v0.31.2/go.mod h1:bWmGvrGPssSK1ljmLzd3pwCQ9MgoTsRCuK35u6SygUk= +k8s.io/apimachinery v0.31.2 h1:i4vUt2hPK56W6mlT7Ry+AO8eEsyxMD1U44NR22CLTYw= +k8s.io/apimachinery v0.31.2/go.mod h1:rsPdaZJfTfLsNJSQzNHQvYoTmxhoOEofxtOsF3rtsMo= +k8s.io/client-go v0.31.2 h1:Y2F4dxU5d3AQj+ybwSMqQnpZH9F30//1ObxOKlTI9yc= +k8s.io/client-go v0.31.2/go.mod h1:NPa74jSVR/+eez2dFsEIHNa+3o09vtNaWwWwb1qSxSs= k8s.io/klog/v2 v2.130.1 h1:n9Xl7H1Xvksem4KFG4PYbdQCQxqc/tTUyrgXaOhHSzk= k8s.io/klog/v2 v2.130.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE= k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340 h1:BZqlfIlq5YbRMFko6/PM7FjZpUb45WallggurYhKGag= diff --git a/kubernetes/manifests/get.go b/kubernetes/manifests/get.go index 1b2ae0e..9aa591e 100644 --- a/kubernetes/manifests/get.go +++ b/kubernetes/manifests/get.go @@ -21,12 +21,10 @@ func GetBootstrapManifests(ctx context.Context, st state.State, filter func(Mani return nil, err } - it := items.Iterator() - objects := []Manifest{} - for it.Next() { - for _, o := range it.Value().TypedSpec().Items { + for manifest := range items.All() { + for _, o := range manifest.TypedSpec().Items { obj := &unstructured.Unstructured{Object: o.Object} if filter != nil && !filter(obj) { diff --git a/kubernetes/upgrade/checks.go b/kubernetes/upgrade/checks.go index 51bb0f7..5d4e6c3 100644 --- a/kubernetes/upgrade/checks.go +++ b/kubernetes/upgrade/checks.go @@ -234,6 +234,7 @@ func NewChecks(path *Path, state state.State, k8sConfig *rest.Config, controlPla removedFeatureGates: []string{ "AllowServiceLBStatusOnNonLB", // https://github.com/kubernetes/kubernetes/pull/126786 "CloudDualStackNodeIPs", // https://github.com/kubernetes/kubernetes/pull/126840 + "DRAControlPlaneController", // https://github.com/kubernetes/kubernetes/pull/128003 "KMSv2", // https://github.com/kubernetes/kubernetes/pull/126698 "KMSv2KDF", // https://github.com/kubernetes/kubernetes/pull/126698 "LegacyServiceAccountTokenCleanUp", // https://github.com/kubernetes/kubernetes/pull/126839 @@ -243,7 +244,12 @@ func NewChecks(path *Path, state state.State, k8sConfig *rest.Config, controlPla "ServerSideApply", // https://github.com/kubernetes/kubernetes/pull/127058 "ServerSideFieldValidation", // https://github.com/kubernetes/kubernetes/pull/127058 "StableLoadBalancerNodeSet", // https://github.com/kubernetes/kubernetes/pull/126841 - "ValiatingAdmissionPolicy", // https://github.com/kubernetes/kubernetes/pull/126645 + "ValidatingAdmissionPolicy", // https://github.com/kubernetes/kubernetes/pull/126645 + }, + kubeAPIServerChecks: apiServerCheck{ + removedAPIResources: []string{ + "podschedulingcontexts.v1alpha3.resource.k8s.io", // https://github.com/kubernetes/kubernetes/pull/128003 + }, }, }, },