Skip to content

Commit

Permalink
Merge pull request #8527 from Prajyot-Parab/main
Browse files Browse the repository at this point in the history
🌱Upgrade golang version (1.19.6 -> 1.20.3)
  • Loading branch information
k8s-ci-robot authored Apr 24, 2023
2 parents 16b345f + 26bba36 commit 2038804
Show file tree
Hide file tree
Showing 13 changed files with 9 additions and 20 deletions.
2 changes: 1 addition & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
run:
timeout: 10m
go: "1.19"
go: "1.20"
build-tags:
- tools
- e2e
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ SHELL:=/usr/bin/env bash
#
# Go.
#
GO_VERSION ?= 1.19.6
GO_VERSION ?= 1.20.3
GO_CONTAINER_IMAGE ?= docker.io/library/golang:$(GO_VERSION)

# Use GOPROXY environment variable if set
Expand Down
2 changes: 1 addition & 1 deletion Tiltfile
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ def load_provider_tiltfiles():

tilt_helper_dockerfile_header = """
# Tilt image
FROM golang:1.19.6 as tilt-helper
FROM golang:1.20.3 as tilt-helper
# Support live reloading with Tilt
RUN go install github.com/go-delve/delve/cmd/dlv@latest
RUN wget --output-document /restart.sh --quiet https://raw.githubusercontent.com/tilt-dev/rerun-process-wrapper/master/restart.sh && \
Expand Down
3 changes: 0 additions & 3 deletions bootstrap/kubeadm/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ import (
"context"
"flag"
"fmt"
"math/rand"
"net/http"
_ "net/http/pprof"
"os"
Expand Down Expand Up @@ -145,8 +144,6 @@ func InitFlags(fs *pflag.FlagSet) {
}

func main() {
rand.Seed(time.Now().UnixNano())

InitFlags(pflag.CommandLine)
pflag.CommandLine.SetNormalizeFunc(cliflag.WordSepNormalizeFunc)
pflag.CommandLine.AddGoFlagSet(flag.CommandLine)
Expand Down
3 changes: 0 additions & 3 deletions controlplane/kubeadm/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ import (
"context"
"flag"
"fmt"
"math/rand"
"net/http"
_ "net/http/pprof"
"os"
Expand Down Expand Up @@ -153,8 +152,6 @@ func InitFlags(fs *pflag.FlagSet) {
feature.MutableGates.AddFlag(fs)
}
func main() {
rand.Seed(time.Now().UnixNano())

InitFlags(pflag.CommandLine)
pflag.CommandLine.SetNormalizeFunc(cliflag.WordSepNormalizeFunc)
pflag.CommandLine.AddGoFlagSet(flag.CommandLine)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ maintainers of providers and consumers of our Go API.

## Minimum Go version

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

## Dependencies

Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module sigs.k8s.io/cluster-api

go 1.19
go 1.20

require (
github.com/MakeNowJust/heredoc v1.0.0
Expand Down
2 changes: 1 addition & 1 deletion hack/ensure-go.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ EOF
local go_version
IFS=" " read -ra go_version <<< "$(go version)"
local minimum_go_version
minimum_go_version=go1.19
minimum_go_version=go1.20.3
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
cat <<EOF
Detected go version: ${go_version[*]}.
Expand Down
2 changes: 1 addition & 1 deletion hack/tools/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module sigs.k8s.io/cluster-api/hack/tools

go 1.19
go 1.20

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

Expand Down
3 changes: 0 additions & 3 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ import (
"context"
"flag"
"fmt"
"math/rand"
"net/http"
_ "net/http/pprof"
"os"
Expand Down Expand Up @@ -208,8 +207,6 @@ func InitFlags(fs *pflag.FlagSet) {
}

func main() {
rand.Seed(time.Now().UnixNano())

InitFlags(pflag.CommandLine)
pflag.CommandLine.SetNormalizeFunc(cliflag.WordSepNormalizeFunc)
pflag.CommandLine.AddGoFlagSet(flag.CommandLine)
Expand Down
2 changes: 1 addition & 1 deletion netlify.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
publish = "docs/book/book"

[build.environment]
GO_VERSION = "1.19"
GO_VERSION = "1.20"

# Standard Netlify redirects
[[redirects]]
Expand Down
2 changes: 1 addition & 1 deletion test/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module sigs.k8s.io/cluster-api/test

go 1.19
go 1.20

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

Expand Down
2 changes: 0 additions & 2 deletions test/infrastructure/docker/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ import (
"context"
"flag"
"fmt"
"math/rand"
"net/http"
"os"
"time"
Expand Down Expand Up @@ -111,7 +110,6 @@ func initFlags(fs *pflag.FlagSet) {
}

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

0 comments on commit 2038804

Please sign in to comment.