Skip to content

Commit b8c95e1

Browse files
authored
Merge pull request kubernetes#129688 from cpanato/update-main-go124
[go] Bump images, dependencies and versions to go 1.24.0
2 parents 341df1a + 650db7f commit b8c95e1

File tree

60 files changed

+564
-496
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+564
-496
lines changed

.go-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.23.6
1+
1.24.0

build/build-image/cross/VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v1.33.0-go1.23.6-bullseye.0
1+
v1.33.0-go1.24.0-bullseye.0

build/common.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,8 @@ readonly KUBE_RSYNC_PORT="${KUBE_RSYNC_PORT:-}"
9797
readonly KUBE_CONTAINER_RSYNC_PORT=8730
9898

9999
# These are the default versions (image tags) for their respective base images.
100-
readonly __default_distroless_iptables_version=v0.6.8
101-
readonly __default_go_runner_version=v2.4.0-go1.23.6-bookworm.0
100+
readonly __default_distroless_iptables_version=v0.7.3
101+
readonly __default_go_runner_version=v2.4.0-go1.24.0-bookworm.0
102102
readonly __default_setcap_version=bookworm-v1.0.4
103103

104104
# These are the base images for the Docker-wrapped binaries.

build/dependencies.yaml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ dependencies:
116116

117117
# Golang
118118
- name: "golang: upstream version"
119-
version: 1.23.6
119+
version: 1.24.0
120120
refPaths:
121121
- path: .go-version
122122
- path: build/build-image/cross/VERSION
@@ -130,8 +130,9 @@ dependencies:
130130
#
131131
# This entry is a stub of the major version to allow dependency checks to
132132
# pass when building Kubernetes using a pre-release of Golang.
133+
133134
- name: "golang: 1.<major>"
134-
version: 1.23
135+
version: 1.24
135136
refPaths:
136137
- path: build/build-image/cross/VERSION
137138
- path: hack/lib/golang.sh
@@ -140,7 +141,7 @@ dependencies:
140141
match: golang:([0-9]+\.[0-9]+).0-bullseye
141142

142143
- name: "registry.k8s.io/kube-cross: dependents"
143-
version: v1.33.0-go1.23.6-bullseye.0
144+
version: v1.33.0-go1.24.0-bullseye.0
144145
refPaths:
145146
- path: build/build-image/cross/VERSION
146147

@@ -178,15 +179,15 @@ dependencies:
178179
match: registry\.k8s\.io\/build-image\/debian-base:[a-zA-Z]+\-v((([0-9]+)\.([0-9]+)\.([0-9]+)(?:-([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?)(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?)
179180

180181
- name: "registry.k8s.io/distroless-iptables: dependents"
181-
version: v0.6.8
182+
version: v0.7.3
182183
refPaths:
183184
- path: build/common.sh
184185
match: __default_distroless_iptables_version=
185186
- path: test/utils/image/manifest.go
186187
match: configs\[DistrolessIptables\] = Config{list\.BuildImageRegistry, "distroless-iptables", "v([0-9]+)\.([0-9]+)\.([0-9]+)"}
187188

188189
- name: "registry.k8s.io/go-runner: dependents"
189-
version: v2.4.0-go1.23.6-bookworm.0
190+
version: v2.4.0-go1.24.0-bookworm.0
190191
refPaths:
191192
- path: build/common.sh
192193
match: __default_go_runner_version=

go.mod

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66

77
module k8s.io/kubernetes
88

9-
go 1.23.0
9+
go 1.24.0
1010

11-
godebug default=go1.23
11+
godebug default=go1.24
1212

1313
require (
1414
bitbucket.org/bertimus9/systemstat v0.5.0

go.work

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
// This is a generated file. Do not edit directly.
22

3-
go 1.23.0
3+
go 1.24.0
44

5-
godebug default=go1.23
5+
godebug default=go1.24
66

77
use (
88
.

hack/golangci-hints.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@
1313

1414
run:
1515
timeout: 30m
16-
skip-files:
17-
- "^zz_generated.*"
1816

1917
output:
2018
sort-results: true
@@ -31,6 +29,9 @@ issues:
3129
# staticcheck: Developers tend to write in C-style with an explicit 'break' in a 'switch', so it's ok to ignore
3230
- ineffective break statement. Did you mean to break out of the outer loop
3331

32+
exclude-files:
33+
- "^zz_generated.*"
34+
3435
# Excluding configuration per-path, per-linter, per-text and per-source
3536
exclude-rules:
3637
# exclude ineffassign linter for generated files for conversion

hack/golangci.yaml

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@
1313

1414
run:
1515
timeout: 30m
16-
skip-files:
17-
- "^zz_generated.*"
1816

1917
output:
2018
sort-results: true
@@ -31,6 +29,9 @@ issues:
3129
# staticcheck: Developers tend to write in C-style with an explicit 'break' in a 'switch', so it's ok to ignore
3230
- ineffective break statement. Did you mean to break out of the outer loop
3331

32+
exclude-files:
33+
- "^zz_generated.*"
34+
3435
# Excluding configuration per-path, per-linter, per-text and per-source
3536
exclude-rules:
3637
# exclude ineffassign linter for generated files for conversion
@@ -72,6 +73,24 @@ issues:
7273
- ginkgolinter
7374
text: use a function call in (Eventually|Consistently)
7475

76+
# Some of these seem legitimate, maybe better fix code (https://github.com/kubernetes/kubernetes/issues/130449).
77+
78+
- linters:
79+
- govet
80+
text: "lostcancel|printf"
81+
82+
- linters:
83+
- ginkgolinter
84+
text: "wrong error assertion. Consider using `gomega.(Eventually|Consistently)|wrong comparison assertion|wrong length assertion"
85+
86+
- linters:
87+
- testifylint
88+
text: "encoded-compare|error-nil|formatter"
89+
90+
- linters:
91+
- gocritic
92+
text: "append result not assigned to the same slice|put a space between `//` and comment text|sloppyLen|elseif|should rewrite switch statement to if statement|regexpMust|wrapperFunc: use strings.ReplaceAll|singleCaseSwitch|deprecatedComment|exitAfterDefer|captLocal|unlambda|underef|unslice|valSwap|typeSwitchVar"
93+
7594
# https://github.com/kubernetes/kubernetes/issues/117288#issuecomment-1507012435
7695
- linters:
7796
- gocritic

hack/golangci.yaml.in

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@
1313

1414
run:
1515
timeout: 30m
16-
skip-files:
17-
- "^zz_generated.*"
1816

1917
output:
2018
sort-results: true
@@ -31,6 +29,9 @@ issues:
3129
# staticcheck: Developers tend to write in C-style with an explicit 'break' in a 'switch', so it's ok to ignore
3230
- ineffective break statement. Did you mean to break out of the outer loop
3331

32+
exclude-files:
33+
- "^zz_generated.*"
34+
3435
# Excluding configuration per-path, per-linter, per-text and per-source
3536
exclude-rules:
3637
# exclude ineffassign linter for generated files for conversion
@@ -75,6 +76,27 @@ issues:
7576
- ginkgolinter
7677
text: use a function call in (Eventually|Consistently)
7778

79+
{{- if .Base}}
80+
81+
# Some of these seem legitimate, maybe better fix code (https://github.com/kubernetes/kubernetes/issues/130449).
82+
83+
- linters:
84+
- govet
85+
text: "lostcancel|printf"
86+
87+
- linters:
88+
- ginkgolinter
89+
text: "wrong error assertion. Consider using `gomega.(Eventually|Consistently)|wrong comparison assertion|wrong length assertion"
90+
91+
- linters:
92+
- testifylint
93+
text: "encoded-compare|error-nil|formatter"
94+
95+
- linters:
96+
- gocritic
97+
text: "append result not assigned to the same slice|put a space between `//` and comment text|sloppyLen|elseif|should rewrite switch statement to if statement|regexpMust|wrapperFunc: use strings.ReplaceAll|singleCaseSwitch|deprecatedComment|exitAfterDefer|captLocal|unlambda|underef|unslice|valSwap|typeSwitchVar"
98+
{{- end}}
99+
78100
# https://github.com/kubernetes/kubernetes/issues/117288#issuecomment-1507012435
79101
- linters:
80102
- gocritic

hack/lib/golang.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -508,7 +508,7 @@ kube::golang::set_platform_envs() {
508508

509509
# if CC is defined for platform then always enable it
510510
ccenv=$(echo "$platform" | awk -F/ '{print "KUBE_" toupper($1) "_" toupper($2) "_CC"}')
511-
if [ -n "${!ccenv-}" ]; then
511+
if [ -n "${!ccenv-}" ]; then
512512
export CGO_ENABLED=1
513513
export CC="${!ccenv}"
514514
fi
@@ -551,7 +551,7 @@ EOF
551551
local go_version
552552
IFS=" " read -ra go_version <<< "$(GOFLAGS='' go version)"
553553
local minimum_go_version
554-
minimum_go_version=go1.23
554+
minimum_go_version=go1.24
555555
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
556556
kube::log::usage_from_stdin <<EOF
557557
Detected go version: ${go_version[*]}.

0 commit comments

Comments
 (0)