Skip to content

Commit

Permalink
update go version to v1.20 (#2312)
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangzujian committed Feb 18, 2023
1 parent 90f504c commit 8fe8bc5
Show file tree
Hide file tree
Showing 12 changed files with 16 additions and 29 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-arm64-image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ concurrency:
cancel-in-progress: true

env:
GO_VERSION: '1.19'
GO_VERSION: '1.20'

jobs:
build:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-kube-ovn-debug.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Build Debug
on: workflow_dispatch

env:
GO_VERSION: '1.19'
GO_VERSION: '1.20'

jobs:
build-debug:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-windows.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ concurrency:
cancel-in-progress: true

env:
GO_VERSION: '1.19'
GO_VERSION: '1.20'
GOSEC_VERSION: '2.14.0'

jobs:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-x86-image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ concurrency:
cancel-in-progress: true

env:
GO_VERSION: '1.19'
GO_VERSION: '1.20'
GOSEC_VERSION: '2.14.0'
KIND_VERSION: v0.17.0
HELM_VERSION: v3.10.1
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ concurrency:
cancel-in-progress: true

env:
GO_VERSION: '1.19'
GO_VERSION: '1.20'

jobs:
golangci:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/scheduled-e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ concurrency:
cancel-in-progress: true

env:
GO_VERSION: '1.19'
GO_VERSION: '1.20'
KIND_VERSION: v0.17.0
HELM_VERSION: v3.10.1

Expand Down
2 changes: 1 addition & 1 deletion docs/development.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

##### Prerequisites:

1. Kube-OVN is developed by [Go](https://golang.org/) 1.19 and uses [Go Modules](https://github.com/golang/go/wiki/Modules) to manage dependency. Make sure `GO111MODULE="on"`.
1. Kube-OVN is developed by [Go](https://golang.org/) 1.20 and uses [Go Modules](https://github.com/golang/go/wiki/Modules) to manage dependency. Make sure `GO111MODULE="on"`.

2. We also use [gosec](https://github.com/securego/gosec) to inspect source code for security problems.

Expand Down
10 changes: 5 additions & 5 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/kubeovn/kube-ovn

go 1.19
go 1.20

require (
github.com/Mellanox/sriovnet v1.1.0
Expand All @@ -26,7 +26,7 @@ require (
github.com/onsi/ginkgo/v2 v2.8.1
github.com/onsi/gomega v1.27.0
github.com/osrg/gobgp/v3 v3.11.0
github.com/ovn-org/libovsdb v0.0.0-20221101143603-8f21d188c3a5
github.com/ovn-org/libovsdb v0.0.0-20230207174348-7f620a35d7e8
github.com/parnurzeal/gorequest v0.2.16
github.com/prometheus/client_golang v1.14.0
github.com/sirupsen/logrus v1.9.0
Expand All @@ -38,7 +38,7 @@ require (
golang.org/x/time v0.3.0
google.golang.org/grpc v1.53.0
google.golang.org/protobuf v1.28.1
gopkg.in/k8snetworkplumbingwg/multus-cni.v3 v3.9.2
gopkg.in/k8snetworkplumbingwg/multus-cni.v3 v3.9.3
k8s.io/api v0.26.1
k8s.io/apimachinery v0.26.1
k8s.io/apiserver v0.26.1
Expand Down Expand Up @@ -265,8 +265,8 @@ replace (
github.com/mdlayher/arp => github.com/kubeovn/arp v0.0.0-20230101053045-8a0772d9c34c
github.com/onsi/ginkgo/v2 => github.com/onsi/ginkgo/v2 v2.4.0
github.com/openshift/client-go => github.com/openshift/client-go v0.0.0-20221107163225-3335a34a1d24
github.com/ovn-org/libovsdb => github.com/kubeovn/libovsdb v0.0.0-20221208095821-f8830e1998e8
gopkg.in/k8snetworkplumbingwg/multus-cni.v3 => github.com/k8snetworkplumbingwg/multus-cni v0.0.0-20220818150730-3d9cec4ec9d5
github.com/ovn-org/libovsdb => github.com/kubeovn/libovsdb v0.0.0-20230208064641-36b813e450dd
gopkg.in/k8snetworkplumbingwg/multus-cni.v3 => github.com/k8snetworkplumbingwg/multus-cni v0.0.0-20221222150008-e692127d1962
k8s.io/api => k8s.io/api v0.26.1
k8s.io/apiextensions-apiserver => k8s.io/apiextensions-apiserver v0.26.1
k8s.io/apimachinery => k8s.io/apimachinery v0.26.1
Expand Down
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -870,8 +870,8 @@ github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7V
github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM=
github.com/k-sone/critbitgo v1.4.0 h1:l71cTyBGeh6X5ATh6Fibgw3+rtNT80BA0uNNWgkPrbE=
github.com/k-sone/critbitgo v1.4.0/go.mod h1:7E6pyoyADnFxlUBEKcnfS49b7SUAQGMK+OAp/UQvo0s=
github.com/k8snetworkplumbingwg/multus-cni v0.0.0-20220818150730-3d9cec4ec9d5 h1:/BiK+qv91VvsZGESzj2Ms6fn+aKcwgye/qyfy07YMls=
github.com/k8snetworkplumbingwg/multus-cni v0.0.0-20220818150730-3d9cec4ec9d5/go.mod h1:UuztUt9fVZCed9aexDAf//44CFiVQwrUnI8o4W4N8L8=
github.com/k8snetworkplumbingwg/multus-cni v0.0.0-20221222150008-e692127d1962 h1:TG7rCrpqReXvgJR5mXo+K7fhQDT1Qq/MzSyrJIdO2xE=
github.com/k8snetworkplumbingwg/multus-cni v0.0.0-20221222150008-e692127d1962/go.mod h1:RvTt2WRNNR/fBOt5Ij1P1+eqq+Ib78T32zABo025Xkk=
github.com/k8snetworkplumbingwg/network-attachment-definition-client v1.4.0 h1:VzM3TYHDgqPkettiP6I6q2jOeQFL4nrJM+UcAc4f6Fs=
github.com/k8snetworkplumbingwg/network-attachment-definition-client v1.4.0/go.mod h1:nqCI7aelBJU61wiBeeZWJ6oi4bJy5nrjkM6lWIMA4j0=
github.com/kardianos/osext v0.0.0-20190222173326-2bc1f35cddc0 h1:iQTw/8FWTuc7uiaSepXwyf3o52HaUYcV+Tu66S3F5GA=
Expand Down Expand Up @@ -906,8 +906,8 @@ github.com/kubeovn/felix v0.0.0-20220325073257-c8a0f705d139 h1:MaLC8/dohKHU8nkfg
github.com/kubeovn/felix v0.0.0-20220325073257-c8a0f705d139/go.mod h1:ulxnUH9cbIOtCH+exhJPeV2mleh+bDv67WKsl/MVU/g=
github.com/kubeovn/kubevirt-client-go v0.0.0-20221209084839-9c2ed1f0604d h1:sM7V2MhONBa10zYQA1yg/UbPm/Y7JqVqymtgoDiGqMo=
github.com/kubeovn/kubevirt-client-go v0.0.0-20221209084839-9c2ed1f0604d/go.mod h1:FjHUGVwls5NE1q8rsSL0LsRU46p35cwgnwSItkr8oXs=
github.com/kubeovn/libovsdb v0.0.0-20221208095821-f8830e1998e8 h1:gkYOU8DJQJeDef9hYETOf0D270zVS3xYuytjFLEi0rc=
github.com/kubeovn/libovsdb v0.0.0-20221208095821-f8830e1998e8/go.mod h1:N20zsElkDpTm57hVDosiZVghprt9Y4Vfqsi1HBXOzr4=
github.com/kubeovn/libovsdb v0.0.0-20230208064641-36b813e450dd h1:fPdrmrfxkFEzVoh1mo2kafDI6tW1lJhUHx0uioYKANM=
github.com/kubeovn/libovsdb v0.0.0-20230208064641-36b813e450dd/go.mod h1:N20zsElkDpTm57hVDosiZVghprt9Y4Vfqsi1HBXOzr4=
github.com/kubeovn/ovsdb v0.0.0-20221213053943-9372db56919f h1:nm0ZlQesCje/A5D0LyWfaSUM8/0ro9PVpwd8hVbLBeM=
github.com/kubeovn/ovsdb v0.0.0-20221213053943-9372db56919f/go.mod h1:LAd0qoeAAm/QyZcpxN2BnpndM2/dhZt+/kokPvcxKcE=
github.com/kubernetes-csi/external-snapshotter/client/v4 v4.2.0 h1:nHHjmvjitIiyPlUHk/ofpgvBcNcawJLtf4PYHORLjAA=
Expand Down
4 changes: 0 additions & 4 deletions pkg/util/arp.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,6 @@ import (
"k8s.io/klog/v2"
)

func init() {
rand.Seed(int64(time.Now().Nanosecond()))
}

func ArpResolve(nic, srcIP, dstIP string, timeout time.Duration, maxRetry int) (net.HardwareAddr, int, error) {
target, err := netip.ParseAddr(dstIP)
if err != nil {
Expand Down
4 changes: 0 additions & 4 deletions test/e2e/framework/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,6 @@ const (
DaemonSetOvsOvn = "ovs-ovn"
)

func init() {
rand.Seed(time.Now().UnixNano())
}

// RandomSuffix provides a random sequence to append to resources.
func RandomSuffix() string {
return fmt.Sprintf("%04d", rand.Intn(10000))
Expand Down
5 changes: 0 additions & 5 deletions test/unittest/ipam/ipam.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import (
"fmt"
"math/rand"
"strings"
"time"

. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
Expand All @@ -13,10 +12,6 @@ import (
"github.com/kubeovn/kube-ovn/pkg/util"
)

func init() {
rand.Seed(time.Now().UnixNano())
}

var _ = Describe("[IPAM]", func() {
subnetName := "test"
ipv4CIDR, ipv6CIDR := "10.16.0.0/16", "fd00::/112"
Expand Down

0 comments on commit 8fe8bc5

Please sign in to comment.