Skip to content

Commit 2038804

Browse files
authored
Merge pull request #8527 from Prajyot-Parab/main
🌱Upgrade golang version (1.19.6 -> 1.20.3)
2 parents 16b345f + 26bba36 commit 2038804

File tree

13 files changed

+9
-20
lines changed

13 files changed

+9
-20
lines changed

.golangci.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
run:
22
timeout: 10m
3-
go: "1.19"
3+
go: "1.20"
44
build-tags:
55
- tools
66
- e2e

Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ SHELL:=/usr/bin/env bash
2323
#
2424
# Go.
2525
#
26-
GO_VERSION ?= 1.19.6
26+
GO_VERSION ?= 1.20.3
2727
GO_CONTAINER_IMAGE ?= docker.io/library/golang:$(GO_VERSION)
2828

2929
# Use GOPROXY environment variable if set

Tiltfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ def load_provider_tiltfiles():
165165

166166
tilt_helper_dockerfile_header = """
167167
# Tilt image
168-
FROM golang:1.19.6 as tilt-helper
168+
FROM golang:1.20.3 as tilt-helper
169169
# Support live reloading with Tilt
170170
RUN go install github.com/go-delve/delve/cmd/dlv@latest
171171
RUN wget --output-document /restart.sh --quiet https://raw.githubusercontent.com/tilt-dev/rerun-process-wrapper/master/restart.sh && \

bootstrap/kubeadm/main.go

-3
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ import (
2121
"context"
2222
"flag"
2323
"fmt"
24-
"math/rand"
2524
"net/http"
2625
_ "net/http/pprof"
2726
"os"
@@ -145,8 +144,6 @@ func InitFlags(fs *pflag.FlagSet) {
145144
}
146145

147146
func main() {
148-
rand.Seed(time.Now().UnixNano())
149-
150147
InitFlags(pflag.CommandLine)
151148
pflag.CommandLine.SetNormalizeFunc(cliflag.WordSepNormalizeFunc)
152149
pflag.CommandLine.AddGoFlagSet(flag.CommandLine)

controlplane/kubeadm/main.go

-3
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ import (
2121
"context"
2222
"flag"
2323
"fmt"
24-
"math/rand"
2524
"net/http"
2625
_ "net/http/pprof"
2726
"os"
@@ -153,8 +152,6 @@ func InitFlags(fs *pflag.FlagSet) {
153152
feature.MutableGates.AddFlag(fs)
154153
}
155154
func main() {
156-
rand.Seed(time.Now().UnixNano())
157-
158155
InitFlags(pflag.CommandLine)
159156
pflag.CommandLine.SetNormalizeFunc(cliflag.WordSepNormalizeFunc)
160157
pflag.CommandLine.AddGoFlagSet(flag.CommandLine)

docs/book/src/developer/providers/migrations/v1.4-to-v1.5.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ maintainers of providers and consumers of our Go API.
55

66
## Minimum Go version
77

8-
- The Go version used by Cluster API is still Go 1.19.x
8+
- The Go version used by Cluster API is Go 1.20.x
99

1010
## Dependencies
1111

go.mod

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module sigs.k8s.io/cluster-api
22

3-
go 1.19
3+
go 1.20
44

55
require (
66
github.com/MakeNowJust/heredoc v1.0.0

hack/ensure-go.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ EOF
3838
local go_version
3939
IFS=" " read -ra go_version <<< "$(go version)"
4040
local minimum_go_version
41-
minimum_go_version=go1.19
41+
minimum_go_version=go1.20.3
4242
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
4343
cat <<EOF
4444
Detected go version: ${go_version[*]}.

hack/tools/go.mod

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module sigs.k8s.io/cluster-api/hack/tools
22

3-
go 1.19
3+
go 1.20
44

55
replace sigs.k8s.io/cluster-api => ../../
66

main.go

-3
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ import (
2121
"context"
2222
"flag"
2323
"fmt"
24-
"math/rand"
2524
"net/http"
2625
_ "net/http/pprof"
2726
"os"
@@ -208,8 +207,6 @@ func InitFlags(fs *pflag.FlagSet) {
208207
}
209208

210209
func main() {
211-
rand.Seed(time.Now().UnixNano())
212-
213210
InitFlags(pflag.CommandLine)
214211
pflag.CommandLine.SetNormalizeFunc(cliflag.WordSepNormalizeFunc)
215212
pflag.CommandLine.AddGoFlagSet(flag.CommandLine)

netlify.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
publish = "docs/book/book"
55

66
[build.environment]
7-
GO_VERSION = "1.19"
7+
GO_VERSION = "1.20"
88

99
# Standard Netlify redirects
1010
[[redirects]]

test/go.mod

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module sigs.k8s.io/cluster-api/test
22

3-
go 1.19
3+
go 1.20
44

55
replace sigs.k8s.io/cluster-api => ../
66

test/infrastructure/docker/main.go

-2
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ import (
2121
"context"
2222
"flag"
2323
"fmt"
24-
"math/rand"
2524
"net/http"
2625
"os"
2726
"time"
@@ -111,7 +110,6 @@ func initFlags(fs *pflag.FlagSet) {
111110
}
112111

113112
func main() {
114-
rand.Seed(time.Now().UnixNano())
115113
if _, err := os.ReadDir("/tmp/"); err != nil {
116114
setupLog.Error(err, "unable to start manager")
117115
os.Exit(1)

0 commit comments

Comments
 (0)