Skip to content

Commit 2c7cea6

Browse files
Upgrade golang version from go 1.24 to 1.25
1 parent 4cf757b commit 2c7cea6

File tree

12 files changed

+104
-126
lines changed

12 files changed

+104
-126
lines changed

.github/workflows/lint-sample.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ jobs:
4343
- name: Run linter
4444
uses: golangci/golangci-lint-action@v8
4545
with:
46-
version: v2.3.0
46+
version: v2.5.0
4747
working-directory: ${{ matrix.folder }}
4848
- name: Run linter via makefile target
4949
working-directory: ${{ matrix.folder }}

.github/workflows/lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
- name: Run linter
2727
uses: golangci/golangci-lint-action@v8
2828
with:
29-
version: v2.3.0
29+
version: v2.5.0
3030

3131
yamllint:
3232
runs-on: ubuntu-latest

docs/book/src/cronjob-tutorial/testdata/project/PROJECT

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# This file is used to track the info used to scaffold your project
33
# and allow the plugins properly work.
44
# More info: https://book.kubebuilder.io/reference/project-config.html
5-
cliVersion: (devel)
5+
cliVersion: v4.7.1-0.20251013232032-b89dd722e54a+dirty
66
domain: tutorial.kubebuilder.io
77
layout:
88
- go.kubebuilder.io/v4

docs/book/src/getting-started/testdata/project/PROJECT

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# This file is used to track the info used to scaffold your project
33
# and allow the plugins properly work.
44
# More info: https://book.kubebuilder.io/reference/project-config.html
5-
cliVersion: (devel)
5+
cliVersion: v4.7.1-0.20251013232032-b89dd722e54a+dirty
66
domain: example.com
77
layout:
88
- go.kubebuilder.io/v4

docs/book/src/multiversion-tutorial/testdata/project/PROJECT

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# This file is used to track the info used to scaffold your project
33
# and allow the plugins properly work.
44
# More info: https://book.kubebuilder.io/reference/project-config.html
5-
cliVersion: (devel)
5+
cliVersion: v4.7.1-0.20251013232032-b89dd722e54a+dirty
66
domain: tutorial.kubebuilder.io
77
layout:
88
- go.kubebuilder.io/v4

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module sigs.k8s.io/kubebuilder/v4
22

3-
go 1.24.5
3+
go 1.25.0
44

55
require (
66
github.com/gobuffalo/flect v1.0.3

test/testdata/generate.sh

Lines changed: 4 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,6 @@
1616

1717
source "$(dirname "$0")/../common.sh"
1818

19-
# To keep fixed the cert-manager version used in the scaffold of eternal types and go version used.
20-
CERT_MANAGER_MODULE="github.com/cert-manager/cert-manager"
21-
CERT_MANAGER_VERSION="${CERT_MANAGER_VERSION:-v1.18.2}"
22-
CERT_MANAGER_IMPORT="${CERT_MANAGER_MODULE}/pkg/apis/certmanager/v1"
23-
GO_VERSION_DIRECTIVE="${GO_VERSION_DIRECTIVE:-1.24.5}"
24-
2519
# This function scaffolds test projects given a project name and flags.
2620
#
2721
# Usage:
@@ -39,10 +33,6 @@ function scaffold_test_project {
3933

4034
header_text "Generating project ${project} with flags: ${init_flags}"
4135
go mod init sigs.k8s.io/kubebuilder/testdata/$project # our repo autodetection will traverse up to the kb module if we don't do this
42-
go mod edit -go="${GO_VERSION_DIRECTIVE}"
43-
if [[ $project == "project-v4" || $project == "project-v4-multigroup" ]]; then
44-
go mod edit -require="${CERT_MANAGER_MODULE}@${CERT_MANAGER_VERSION}"
45-
fi
4636
header_text "Initializing project ..."
4737
$kb init $init_flags --domain testproject.org --license apache2 --owner "The Kubernetes authors"
4838

@@ -60,12 +50,9 @@ function scaffold_test_project {
6050
$kb create api --group crew --version v1 --kind Admiral --plural=admirales --controller=true --resource=true --namespaced=false --make=false
6151
$kb create webhook --group crew --version v1 --kind Admiral --plural=admirales --defaulting
6252
# Controller for External types
63-
go mod edit -require="${CERT_MANAGER_MODULE}@${CERT_MANAGER_VERSION}"
64-
$kb create api --group "cert-manager" --version v1 --kind Certificate --controller=true --resource=false --make=false --external-api-path="${CERT_MANAGER_IMPORT}" --external-api-domain=io
53+
$kb create api --group "cert-manager" --version v1 --kind Certificate --controller=true --resource=false --make=false --external-api-path=github.com/cert-manager/cert-manager/pkg/apis/certmanager/v1 --external-api-domain=io
6554
# Webhook for External types
66-
go mod edit -require="${CERT_MANAGER_MODULE}@${CERT_MANAGER_VERSION}"
67-
$kb create webhook --group "cert-manager" --version v1 --kind Issuer --defaulting --external-api-path="${CERT_MANAGER_IMPORT}" --external-api-domain=io
68-
go mod edit -require="${CERT_MANAGER_MODULE}@${CERT_MANAGER_VERSION}"
55+
$kb create webhook --group "cert-manager" --version v1 --kind Issuer --defaulting --external-api-path=github.com/cert-manager/cert-manager/pkg/apis/certmanager/v1 --external-api-domain=io
6956
# Webhook for Core type
7057
$kb create webhook --group core --version v1 --kind Pod --defaulting
7158
# Webhook for kubernetes Core type that is part of an api group
@@ -94,12 +81,9 @@ function scaffold_test_project {
9481
$kb create api --group foo --version v1 --kind Bar --controller=true --resource=true --make=false
9582
$kb create api --group fiz --version v1 --kind Bar --controller=true --resource=true --make=false
9683
# Controller for External types
97-
go mod edit -require="${CERT_MANAGER_MODULE}@${CERT_MANAGER_VERSION}"
98-
$kb create api --group "cert-manager" --version v1 --kind Certificate --controller=true --resource=false --make=false --external-api-path="${CERT_MANAGER_IMPORT}" --external-api-domain=io
84+
$kb create api --group "cert-manager" --version v1 --kind Certificate --controller=true --resource=false --make=false --external-api-path=github.com/cert-manager/cert-manager/pkg/apis/certmanager/v1 --external-api-domain=io
9985
# Webhook for External types
100-
go mod edit -require="${CERT_MANAGER_MODULE}@${CERT_MANAGER_VERSION}"
101-
$kb create webhook --group "cert-manager" --version v1 --kind Issuer --defaulting --external-api-path="${CERT_MANAGER_IMPORT}" --external-api-domain=io
102-
go mod edit -require="${CERT_MANAGER_MODULE}@${CERT_MANAGER_VERSION}"
86+
$kb create webhook --group "cert-manager" --version v1 --kind Issuer --defaulting --external-api-path=github.com/cert-manager/cert-manager/pkg/apis/certmanager/v1 --external-api-domain=io
10387
# Webhook for Core type
10488
$kb create webhook --group core --version v1 --kind Pod --programmatic-validation --make=false
10589
# Webhook for kubernetes Core type that is part of an api group
@@ -136,10 +120,6 @@ function scaffold_test_project {
136120
# To avoid conflicts
137121
rm -f go.sum
138122
go mod tidy
139-
go mod edit -go="${GO_VERSION_DIRECTIVE}"
140-
if [[ $project == "project-v4" || $project == "project-v4-multigroup" ]]; then
141-
go mod edit -require="${CERT_MANAGER_MODULE}@${CERT_MANAGER_VERSION}"
142-
fi
143123
popd
144124
}
145125

testdata/project-v4-multigroup/PROJECT

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# This file is used to track the info used to scaffold your project
33
# and allow the plugins properly work.
44
# More info: https://book.kubebuilder.io/reference/project-config.html
5-
cliVersion: (devel)
5+
cliVersion: v4.7.1-0.20251013232032-b89dd722e54a+dirty
66
domain: testproject.org
77
layout:
88
- go.kubebuilder.io/v4

testdata/project-v4-multigroup/go.mod

Lines changed: 45 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,38 @@
11
module sigs.k8s.io/kubebuilder/testdata/project-v4-multigroup
22

3-
go 1.24.5
3+
go 1.25.0
44

55
require (
6+
github.com/cert-manager/cert-manager v1.19.0
67
github.com/onsi/ginkgo/v2 v2.22.0
78
github.com/onsi/gomega v1.36.1
89
k8s.io/api v0.34.1
910
k8s.io/apimachinery v0.34.1
1011
k8s.io/client-go v0.34.1
12+
k8s.io/utils v0.0.0-20250820121507-0af2bda4dd1d
1113
sigs.k8s.io/controller-runtime v0.22.3
1214
)
1315

14-
require sigs.k8s.io/gateway-api v1.1.0 // indirect
15-
1616
require (
1717
cel.dev/expr v0.24.0 // indirect
1818
github.com/antlr4-go/antlr/v4 v4.13.1 // indirect
1919
github.com/beorn7/perks v1.0.1 // indirect
2020
github.com/blang/semver/v4 v4.0.0 // indirect
21-
github.com/cenkalti/backoff/v4 v4.3.0 // indirect
22-
github.com/cert-manager/cert-manager v1.18.2
21+
github.com/cenkalti/backoff/v5 v5.0.3 // indirect
2322
github.com/cespare/xxhash/v2 v2.3.0 // indirect
2423
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
25-
github.com/emicklei/go-restful/v3 v3.12.2 // indirect
24+
github.com/emicklei/go-restful/v3 v3.13.0 // indirect
2625
github.com/evanphx/json-patch/v5 v5.9.11 // indirect
2726
github.com/felixge/httpsnoop v1.0.4 // indirect
2827
github.com/fsnotify/fsnotify v1.9.0 // indirect
2928
github.com/fxamacker/cbor/v2 v2.9.0 // indirect
30-
github.com/go-logr/logr v1.4.2 // indirect
29+
github.com/go-logr/logr v1.4.3 // indirect
3130
github.com/go-logr/stdr v1.2.2 // indirect
3231
github.com/go-logr/zapr v1.3.0 // indirect
33-
github.com/go-openapi/jsonpointer v0.21.0 // indirect
34-
github.com/go-openapi/jsonreference v0.21.0 // indirect
35-
github.com/go-openapi/swag v0.23.0 // indirect
32+
github.com/go-openapi/jsonpointer v0.22.1 // indirect
33+
github.com/go-openapi/jsonreference v0.21.2 // indirect
34+
github.com/go-openapi/swag v0.23.1 // indirect
35+
github.com/go-openapi/swag/jsonname v0.25.1 // indirect
3636
github.com/go-task/slim-sprig/v3 v3.0.0 // indirect
3737
github.com/gogo/protobuf v1.3.2 // indirect
3838
github.com/google/btree v1.1.3 // indirect
@@ -41,62 +41,61 @@ require (
4141
github.com/google/go-cmp v0.7.0 // indirect
4242
github.com/google/pprof v0.0.0-20241029153458-d1b30febd7db // indirect
4343
github.com/google/uuid v1.6.0 // indirect
44-
github.com/grpc-ecosystem/grpc-gateway/v2 v2.26.3 // indirect
44+
github.com/grpc-ecosystem/grpc-gateway/v2 v2.27.1 // indirect
4545
github.com/inconshreveable/mousetrap v1.1.0 // indirect
4646
github.com/josharian/intern v1.0.0 // indirect
4747
github.com/json-iterator/go v1.1.12 // indirect
4848
github.com/mailru/easyjson v0.9.0 // indirect
4949
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
5050
github.com/modern-go/reflect2 v1.0.3-0.20250322232337-35a7c28c31ee // indirect
5151
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
52-
github.com/pkg/errors v0.9.1 // indirect
5352
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
54-
github.com/prometheus/client_golang v1.22.0 // indirect
55-
github.com/prometheus/client_model v0.6.1 // indirect
56-
github.com/prometheus/common v0.62.0 // indirect
57-
github.com/prometheus/procfs v0.15.1 // indirect
58-
github.com/spf13/cobra v1.9.1 // indirect
59-
github.com/spf13/pflag v1.0.6 // indirect
60-
github.com/stoewer/go-strcase v1.3.0 // indirect
53+
github.com/prometheus/client_golang v1.23.2 // indirect
54+
github.com/prometheus/client_model v0.6.2 // indirect
55+
github.com/prometheus/common v0.66.1 // indirect
56+
github.com/prometheus/procfs v0.17.0 // indirect
57+
github.com/spf13/cobra v1.10.1 // indirect
58+
github.com/spf13/pflag v1.0.10 // indirect
59+
github.com/stoewer/go-strcase v1.3.1 // indirect
6160
github.com/x448/float16 v0.8.4 // indirect
6261
go.opentelemetry.io/auto/sdk v1.1.0 // indirect
63-
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.58.0 // indirect
64-
go.opentelemetry.io/otel v1.35.0 // indirect
65-
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.34.0 // indirect
66-
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.34.0 // indirect
67-
go.opentelemetry.io/otel/metric v1.35.0 // indirect
68-
go.opentelemetry.io/otel/sdk v1.34.0 // indirect
69-
go.opentelemetry.io/otel/trace v1.35.0 // indirect
70-
go.opentelemetry.io/proto/otlp v1.5.0 // indirect
62+
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.61.0 // indirect
63+
go.opentelemetry.io/otel v1.37.0 // indirect
64+
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.37.0 // indirect
65+
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.37.0 // indirect
66+
go.opentelemetry.io/otel/metric v1.37.0 // indirect
67+
go.opentelemetry.io/otel/sdk v1.37.0 // indirect
68+
go.opentelemetry.io/otel/trace v1.37.0 // indirect
69+
go.opentelemetry.io/proto/otlp v1.7.0 // indirect
7170
go.uber.org/multierr v1.11.0 // indirect
7271
go.uber.org/zap v1.27.0 // indirect
7372
go.yaml.in/yaml/v2 v2.4.2 // indirect
7473
go.yaml.in/yaml/v3 v3.0.4 // indirect
75-
golang.org/x/exp v0.0.0-20241217172543-b2144cdd0a67 // indirect
76-
golang.org/x/net v0.38.0 // indirect
77-
golang.org/x/oauth2 v0.28.0 // indirect
78-
golang.org/x/sync v0.14.0 // indirect
79-
golang.org/x/sys v0.33.0 // indirect
80-
golang.org/x/term v0.32.0 // indirect
81-
golang.org/x/text v0.25.0 // indirect
82-
golang.org/x/time v0.9.0 // indirect
83-
golang.org/x/tools v0.28.0 // indirect
84-
gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect
85-
google.golang.org/genproto/googleapis/api v0.0.0-20250303144028-a0af3efb3deb // indirect
86-
google.golang.org/genproto/googleapis/rpc v0.0.0-20250303144028-a0af3efb3deb // indirect
87-
google.golang.org/grpc v1.72.1 // indirect
88-
google.golang.org/protobuf v1.36.5 // indirect
89-
gopkg.in/evanphx/json-patch.v4 v4.12.0 // indirect
74+
golang.org/x/exp v0.0.0-20250718183923-645b1fa84792 // indirect
75+
golang.org/x/net v0.44.0 // indirect
76+
golang.org/x/oauth2 v0.31.0 // indirect
77+
golang.org/x/sync v0.17.0 // indirect
78+
golang.org/x/sys v0.36.0 // indirect
79+
golang.org/x/term v0.35.0 // indirect
80+
golang.org/x/text v0.29.0 // indirect
81+
golang.org/x/time v0.13.0 // indirect
82+
golang.org/x/tools v0.36.0 // indirect
83+
gomodules.xyz/jsonpatch/v2 v2.5.0 // indirect
84+
google.golang.org/genproto/googleapis/api v0.0.0-20250721164621-a45f3dfb1074 // indirect
85+
google.golang.org/genproto/googleapis/rpc v0.0.0-20250929231259-57b25ae835d4 // indirect
86+
google.golang.org/grpc v1.75.1 // indirect
87+
google.golang.org/protobuf v1.36.9 // indirect
88+
gopkg.in/evanphx/json-patch.v4 v4.13.0 // indirect
9089
gopkg.in/inf.v0 v0.9.1 // indirect
9190
gopkg.in/yaml.v3 v3.0.1 // indirect
9291
k8s.io/apiextensions-apiserver v0.34.1 // indirect
9392
k8s.io/apiserver v0.34.1 // indirect
9493
k8s.io/component-base v0.34.1 // indirect
9594
k8s.io/klog/v2 v2.130.1 // indirect
96-
k8s.io/kube-openapi v0.0.0-20250710124328-f3f2b991d03b // indirect
97-
k8s.io/utils v0.0.0-20250604170112-4c0f3b243397
98-
sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.31.2 // indirect
99-
sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8 // indirect
95+
k8s.io/kube-openapi v0.0.0-20250910181357-589584f1c912 // indirect
96+
sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.33.0 // indirect
97+
sigs.k8s.io/gateway-api v1.4.0 // indirect
98+
sigs.k8s.io/json v0.0.0-20250730193827-2d320260d730 // indirect
10099
sigs.k8s.io/randfill v1.0.0 // indirect
101100
sigs.k8s.io/structured-merge-diff/v6 v6.3.0 // indirect
102101
sigs.k8s.io/yaml v1.6.0 // indirect

testdata/project-v4-with-plugins/PROJECT

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# This file is used to track the info used to scaffold your project
33
# and allow the plugins properly work.
44
# More info: https://book.kubebuilder.io/reference/project-config.html
5-
cliVersion: (devel)
5+
cliVersion: v4.7.1-0.20251013232032-b89dd722e54a+dirty
66
domain: testproject.org
77
layout:
88
- go.kubebuilder.io/v4

0 commit comments

Comments
 (0)