From b9ddf07a75e728cd28582089ded406e5c15c90d3 Mon Sep 17 00:00:00 2001 From: cpanato Date: Thu, 15 Dec 2022 11:40:33 +0100 Subject: [PATCH] [go] Bump images, dependencies and versions to go 1.20 Signed-off-by: cpanato --- .go-version | 2 +- build/build-image/cross/VERSION | 2 +- build/common.sh | 2 +- build/dependencies.yaml | 13 +++++++------ hack/lib/golang.sh | 1 + staging/publishing/rules.yaml | 2 +- test/images/Makefile | 2 +- 7 files changed, 13 insertions(+), 11 deletions(-) diff --git a/.go-version b/.go-version index 7a8a49471c2..0fdd2359fde 100644 --- a/.go-version +++ b/.go-version @@ -1 +1 @@ -1.19.5 \ No newline at end of file +1.20 \ No newline at end of file diff --git a/build/build-image/cross/VERSION b/build/build-image/cross/VERSION index 70535c82099..8de3e2482a6 100644 --- a/build/build-image/cross/VERSION +++ b/build/build-image/cross/VERSION @@ -1 +1 @@ -v1.26.0-go1.19.5-bullseye.0 +v1.27.0-go1.20-bullseye.0 diff --git a/build/common.sh b/build/common.sh index d3f18c198bd..b493ed33f01 100755 --- a/build/common.sh +++ b/build/common.sh @@ -96,7 +96,7 @@ readonly KUBE_CONTAINER_RSYNC_PORT=8730 # These are the default versions (image tags) for their respective base images. readonly __default_distroless_iptables_version=v0.1.2 -readonly __default_go_runner_version=v2.3.1-go1.19.5-bullseye.0 +readonly __default_go_runner_version=v2.3.1-go1.20-bullseye.0 readonly __default_setcap_version=bullseye-v1.3.0 # These are the base images for the Docker-wrapped binaries. diff --git a/build/dependencies.yaml b/build/dependencies.yaml index caa227737cb..b31c6dcefe9 100644 --- a/build/dependencies.yaml +++ b/build/dependencies.yaml @@ -95,7 +95,7 @@ dependencies: # Golang - name: "golang: upstream version" - version: 1.19.5 + version: 1.20 refPaths: - path: .go-version - path: build/build-image/cross/VERSION @@ -110,14 +110,15 @@ dependencies: # This entry is a stub of the major version to allow dependency checks to # pass when building Kubernetes using a pre-release of Golang. - name: "golang: 1." - version: 1.19 + version: 1.20 refPaths: - path: build/build-image/cross/VERSION - - path: hack/lib/golang.sh - match: minimum_go_version=go([0-9]+\.[0-9]+) + # TODO(cpanato): Need to switch this to 1.20 once we update images to newer go version + # - path: hack/lib/golang.sh + # match: minimum_go_version=go([0-9]+\.[0-9]+) - name: "registry.k8s.io/kube-cross: dependents" - version: v1.26.0-go1.19.5-bullseye.0 + version: v1.27.0-go1.20-bullseye.0 refPaths: - path: build/build-image/cross/VERSION @@ -147,7 +148,7 @@ dependencies: match: configs\[DistrolessIptables\] = Config{list\.BuildImageRegistry, "distroless-iptables", "v([0-9]+)\.([0-9]+)\.([0-9]+)"} - name: "registry.k8s.io/go-runner: dependents" - version: v2.3.1-go1.19.5-bullseye.0 + version: v2.3.1-go1.20-bullseye.0 refPaths: - path: build/common.sh match: __default_go_runner_version= diff --git a/hack/lib/golang.sh b/hack/lib/golang.sh index cb28fcabcd6..5b1161de6b3 100755 --- a/hack/lib/golang.sh +++ b/hack/lib/golang.sh @@ -490,6 +490,7 @@ EOF local go_version IFS=" " read -ra go_version <<< "$(GOFLAGS='' go version)" local minimum_go_version + # TODO(cpanato): Need to switch this to 1.20 once we update images to newer go version minimum_go_version=go1.19 if [[ "${minimum_go_version}" != $(echo -e "${minimum_go_version}\n${go_version[2]}" | sort -s -t. -k 1,1 -k 2,2n -k 3,3n | head -n1) && "${go_version[2]}" != "devel" ]]; then kube::log::usage_from_stdin <