Skip to content

Commit effdf97

Browse files
authored
Merge pull request #53 from fengshunli/go
Feat: upgrade go version 1.18
2 parents 0da5f39 + 489c331 commit effdf97

File tree

432 files changed

+85364
-17546
lines changed

Some content is hidden

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

432 files changed

+85364
-17546
lines changed

.github/workflows/cicd.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
- name: Setup Go environment
1616
uses: actions/[email protected]
1717
with:
18-
go-version: 1.17.12
18+
go-version: 1.18
1919

2020
- name: Install kustomize
2121
run: |
@@ -41,8 +41,8 @@ jobs:
4141
run: |
4242
sudo swapoff -a
4343
sudo apt-get update && sudo apt-get install -y apt-transport-https ca-certificates curl
44-
sudo curl -fsSLo /usr/share/keyrings/kubernetes-archive-keyring.gpg https://packages.cloud.google.com/apt/doc/apt-key.gpg
45-
echo "deb [signed-by=/usr/share/keyrings/kubernetes-archive-keyring.gpg] https://apt.kubernetes.io/ kubernetes-xenial main" | sudo tee /etc/apt/sources.list.d/kubernetes.list
44+
curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo gpg --dearmor -o /usr/share/keyrings/kubernetes-archive-keyring.gpg
45+
sudo echo "deb [signed-by=/usr/share/keyrings/kubernetes-archive-keyring.gpg] https://apt.kubernetes.io/ kubernetes-xenial main" | sudo tee /etc/apt/sources.list.d/kubernetes.list
4646
sudo apt-get update
4747
sudo apt-get install -y kubectl=1.20.15-00 kubelet=1.20.15-00 kubeadm=1.20.15-00
4848
sudo apt-mark hold kubelet kubeadm kubectl

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Build the curve-operator binary
2-
FROM golang:1.17 as builder
2+
FROM golang:1.18 as builder
33

44
WORKDIR /workspace
55
# Copy the Go Modules manifests
@@ -38,7 +38,7 @@ RUN echo "deb http://mirrors.aliyun.com/ubuntu/ focal main restricted" > /etc/ap
3838
echo "deb http://mirrors.aliyun.com/ubuntu/ focal-security main restricted" >> /etc/apt/sources.list && \
3939
echo "deb http://mirrors.aliyun.com/ubuntu/ focal-security universe" >> /etc/apt/sources.list && \
4040
echo "deb http://mirrors.aliyun.com/ubuntu/ focal-security multiverse" >> /etc/apt/sources.list
41-
41+
4242
# Install utility tools
4343
RUN apt-get update -y && \
4444
apt-get install -y coreutils dnsutils iputils-ping iproute2 telnet curl vim less wget graphviz unzip tcpdump gdb && \

Makefile

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ ifeq (, $(shell which controller-gen))
8181
CONTROLLER_GEN_TMP_DIR=$$(mktemp -d) ;\
8282
cd $$CONTROLLER_GEN_TMP_DIR ;\
8383
go mod init tmp ;\
84-
go get sigs.k8s.io/controller-tools/cmd/[email protected] ;\
84+
go install sigs.k8s.io/controller-tools/cmd/[email protected] ;\
8585
rm -rf $$CONTROLLER_GEN_TMP_DIR ;\
8686
}
8787
CONTROLLER_GEN=$(GOBIN)/controller-gen
@@ -91,7 +91,7 @@ endif
9191

9292
KUSTOMIZE = $(GOBIN)/kustomize
9393
kustomize: ## Download kustomize locally if necessary.
94-
$(call go-get-tool,$(KUSTOMIZE),sigs.k8s.io/kustomize/kustomize/v4@v4.0.5)
94+
$(call go-get-tool,$(KUSTOMIZE),sigs.k8s.io/kustomize/kustomize/v4@v4.5.2)
9595

9696
# go-get-tool will 'go get' any package $2 and install it to $1.
9797
PROJECT_DIR := $(shell dirname $(abspath $(lastword $(MAKEFILE_LIST))))
@@ -102,7 +102,8 @@ TMP_DIR=$$(mktemp -d) ;\
102102
cd $$TMP_DIR ;\
103103
go mod init tmp ;\
104104
echo "Downloading $(2)" ;\
105-
go get $(2) ;\
105+
go install $(2) ;\
106106
rm -rf $$TMP_DIR ;\
107107
}
108-
endef
108+
endef
109+

go.mod

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
module github.com/opencurve/curve-operator
22

3-
go 1.17
3+
go 1.18
44

55
require (
66
emperror.dev/errors v0.8.1
77
github.com/coreos/pkg v0.0.0-20180108230652-97fdf19511ea
88
github.com/evanphx/json-patch v4.5.0+incompatible
99
github.com/go-logr/logr v0.1.0
10-
github.com/json-iterator/go v1.1.8
10+
github.com/json-iterator/go v1.1.11
1111
github.com/pkg/errors v0.9.1
1212
github.com/spf13/cobra v0.0.5
1313
github.com/spf13/pflag v1.0.5
@@ -19,15 +19,16 @@ require (
1919

2020
require (
2121
cloud.google.com/go v0.38.0 // indirect
22-
github.com/beorn7/perks v1.0.0 // indirect
22+
github.com/beorn7/perks v1.0.1 // indirect
23+
github.com/cespare/xxhash/v2 v2.1.1 // indirect
2324
github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e // indirect
2425
github.com/davecgh/go-spew v1.1.1 // indirect
2526
github.com/docker/spdystream v0.0.0-20160310174837-449fdfce4d96 // indirect
2627
github.com/go-logr/zapr v0.1.0 // indirect
27-
github.com/gogo/protobuf v1.2.2-0.20190723190241-65acae22fc9d // indirect
28+
github.com/gogo/protobuf v1.3.2 // indirect
2829
github.com/golang/groupcache v0.0.0-20180513044358-24b0969c4cb7 // indirect
29-
github.com/golang/protobuf v1.3.2 // indirect
30-
github.com/google/go-cmp v0.3.0 // indirect
30+
github.com/golang/protobuf v1.4.3 // indirect
31+
github.com/google/go-cmp v0.5.5 // indirect
3132
github.com/google/gofuzz v1.0.0 // indirect
3233
github.com/google/uuid v1.1.1 // indirect
3334
github.com/googleapis/gnostic v0.3.1 // indirect
@@ -37,24 +38,26 @@ require (
3738
github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect
3839
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
3940
github.com/modern-go/reflect2 v1.0.1 // indirect
40-
github.com/prometheus/client_golang v1.0.0 // indirect
41-
github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90 // indirect
42-
github.com/prometheus/common v0.4.1 // indirect
43-
github.com/prometheus/procfs v0.0.2 // indirect
41+
github.com/prometheus/client_golang v1.11.1 // indirect
42+
github.com/prometheus/client_model v0.2.0 // indirect
43+
github.com/prometheus/common v0.26.0 // indirect
44+
github.com/prometheus/procfs v0.6.0 // indirect
4445
go.uber.org/atomic v1.7.0 // indirect
4546
go.uber.org/multierr v1.6.0 // indirect
4647
go.uber.org/zap v1.10.0 // indirect
47-
golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586 // indirect
48-
golang.org/x/net v0.0.0-20191004110552-13f9640d40b9 // indirect
48+
golang.org/x/crypto v0.9.0 // indirect
49+
golang.org/x/net v0.10.0 // indirect
4950
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45 // indirect
50-
golang.org/x/sys v0.7.0 // indirect
51-
golang.org/x/text v0.3.2 // indirect
51+
golang.org/x/sys v0.8.0 // indirect
52+
golang.org/x/term v0.8.0 // indirect
53+
golang.org/x/text v0.9.0 // indirect
5254
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4 // indirect
5355
gomodules.xyz/jsonpatch/v2 v2.0.1 // indirect
5456
google.golang.org/appengine v1.5.0 // indirect
57+
google.golang.org/protobuf v1.26.0-rc.1 // indirect
5558
gopkg.in/fsnotify.v1 v1.4.7 // indirect
5659
gopkg.in/inf.v0 v0.9.1 // indirect
57-
gopkg.in/yaml.v2 v2.2.4 // indirect
60+
gopkg.in/yaml.v2 v2.3.0 // indirect
5861
k8s.io/apiextensions-apiserver v0.17.2 // indirect
5962
k8s.io/klog v1.0.0 // indirect
6063
k8s.io/kube-openapi v0.0.0-20191107075043-30be4d16710a // indirect

0 commit comments

Comments
 (0)