Skip to content

Commit 46b6ad3

Browse files
committed
upgrade kubebuilder version from v2.3.0 to v3.2.0
1 parent 10f674a commit 46b6ad3

File tree

8 files changed

+204
-234
lines changed

8 files changed

+204
-234
lines changed

.github/workflows/test-go.yaml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,6 @@ jobs:
3636
- name: Run Go test
3737
run: |
3838
go mod download
39-
40-
curl -L -O "https://github.com/kubernetes-sigs/kubebuilder/releases/download/v2.3.0/kubebuilder_2.3.0_linux_amd64.tar.gz"
41-
tar -zxvf kubebuilder_2.3.0_linux_amd64.tar.gz
42-
sudo mv kubebuilder_2.3.0_linux_amd64 /usr/local/kubebuilder
43-
export PATH=$PATH:/usr/local/kubebuilder/bin
44-
4539
make check
4640
make test
4741

Makefile

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
HAS_LINT := $(shell command -v golangci-lint;)
22
HAS_SHELLCHECK := $(shell command shellcheck --version)
3+
HAS_SETUP_ENVTEST := $(shell command setup-envtest list)
4+
35
COMMIT := v1beta1-$(shell git rev-parse --short=7 HEAD)
46
KATIB_REGISTRY := docker.io/kubeflowkatib
57
CPU_ARCH ?= amd64
8+
ENVTEST_K8S_VERSION ?= 1.22
69

710
# for pytest
811
PYTHONPATH := $(PYTHONPATH):$(CURDIR)/pkg/apis/manager/v1beta1/python:$(CURDIR)/pkg/apis/manager/health/python
@@ -11,8 +14,16 @@ TEST_TENSORFLOW_EVENT_FILE_PATH ?= $(CURDIR)/test/unit/v1beta1/metricscollector/
1114

1215
# Run tests
1316
.PHONY: test
14-
test:
15-
go test ./pkg/... ./cmd/... -coverprofile coverage.out
17+
test: envtest
18+
KUBEBUILDER_ASSETS="$(shell setup-envtest use $(ENVTEST_K8S_VERSION) -p path)" go test ./pkg/... ./cmd/... -coverprofile coverage.out
19+
20+
envtest:
21+
ifndef HAS_SETUP_ENVTEST
22+
go install sigs.k8s.io/controller-runtime/tools/setup-envtest@c48baad70c539a2efb8dfe8850434ecc721c1ee1 # v0.10.0
23+
echo "setup-envtest has been installed"
24+
endif
25+
echo "setup-envtest has already installed"
26+
1627

1728
check: generate fmt vet lint
1829

go.mod

Lines changed: 37 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -7,42 +7,41 @@ require (
77
github.com/awalterschulze/gographviz v2.0.3+incompatible
88
github.com/c-bata/goptuna v0.8.0
99
github.com/ghodss/yaml v1.0.1-0.20190212211648-25d852aebe32
10-
github.com/go-openapi/spec v0.19.5
1110
github.com/go-sql-driver/mysql v1.5.0
1211
github.com/golang/mock v1.6.0
1312
github.com/golang/protobuf v1.5.2
1413
github.com/google/go-containerregistry v0.4.1-0.20210128200529-19c2b639fab1
1514
github.com/google/go-containerregistry/pkg/authn/k8schain v0.0.0-20210224013640-6928f6d356ab
16-
github.com/grpc-ecosystem/go-grpc-middleware v1.2.0
15+
github.com/grpc-ecosystem/go-grpc-middleware v1.3.0
1716
github.com/hpcloud/tail v1.0.1-0.20180514194441-a1dbeea552b7
1817
github.com/mattbaird/jsonpatch v0.0.0-20171005235357-81af80346b1a
19-
github.com/onsi/gomega v1.10.3
20-
github.com/prometheus/client_golang v1.9.0
18+
github.com/onsi/gomega v1.15.0
19+
github.com/prometheus/client_golang v1.11.0
2120
github.com/shirou/gopsutil v2.20.7+incompatible
2221
github.com/spf13/cobra v1.2.1
2322
github.com/spf13/viper v1.8.1
2423
github.com/tidwall/gjson v1.6.0
25-
golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4
24+
golang.org/x/net v0.0.0-20210520170846-37e1c6afe023
2625
google.golang.org/grpc v1.38.0
27-
k8s.io/api v0.20.4
28-
k8s.io/apimachinery v0.20.4
29-
k8s.io/client-go v0.20.4
30-
k8s.io/code-generator v0.20.4
26+
k8s.io/api v0.22.2
27+
k8s.io/apimachinery v0.22.2
28+
k8s.io/client-go v0.22.2
29+
k8s.io/code-generator v0.22.2
3130
k8s.io/klog v1.0.0
32-
k8s.io/kube-openapi v0.0.0-20210113233702-8566a335510f
33-
sigs.k8s.io/controller-runtime v0.8.2
31+
k8s.io/kube-openapi v0.0.0-20210421082810-95288971da7e
32+
sigs.k8s.io/controller-runtime v0.10.0
3433
)
3534

3635
require (
3736
cloud.google.com/go v0.81.0 // indirect
3837
github.com/Azure/azure-sdk-for-go v43.0.0+incompatible // indirect
3938
github.com/Azure/go-autorest v14.2.0+incompatible // indirect
40-
github.com/Azure/go-autorest/autorest v0.11.1 // indirect
41-
github.com/Azure/go-autorest/autorest/adal v0.9.5 // indirect
39+
github.com/Azure/go-autorest/autorest v0.11.18 // indirect
40+
github.com/Azure/go-autorest/autorest/adal v0.9.13 // indirect
4241
github.com/Azure/go-autorest/autorest/date v0.3.0 // indirect
4342
github.com/Azure/go-autorest/autorest/to v0.3.0 // indirect
4443
github.com/Azure/go-autorest/autorest/validation v0.1.0 // indirect
45-
github.com/Azure/go-autorest/logger v0.2.0 // indirect
44+
github.com/Azure/go-autorest/logger v0.2.1 // indirect
4645
github.com/Azure/go-autorest/tracing v0.6.0 // indirect
4746
github.com/PuerkitoBio/purell v1.1.1 // indirect
4847
github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 // indirect
@@ -56,29 +55,29 @@ require (
5655
github.com/docker/docker v1.4.2-0.20190924003213-a8608b5b67c7 // indirect
5756
github.com/docker/docker-credential-helpers v0.6.3 // indirect
5857
github.com/emicklei/go-restful v2.9.5+incompatible // indirect
59-
github.com/evanphx/json-patch v4.9.0+incompatible // indirect
60-
github.com/form3tech-oss/jwt-go v3.2.2+incompatible // indirect
58+
github.com/evanphx/json-patch v4.11.0+incompatible // indirect
59+
github.com/form3tech-oss/jwt-go v3.2.3+incompatible // indirect
6160
github.com/fsnotify/fsnotify v1.4.9 // indirect
6261
github.com/go-logr/logr v0.4.0 // indirect
63-
github.com/go-logr/zapr v0.2.0 // indirect
62+
github.com/go-logr/zapr v0.4.0 // indirect
6463
github.com/go-ole/go-ole v1.2.5 // indirect
65-
github.com/go-openapi/jsonpointer v0.19.3 // indirect
66-
github.com/go-openapi/jsonreference v0.19.3 // indirect
67-
github.com/go-openapi/swag v0.19.5 // indirect
64+
github.com/go-openapi/jsonpointer v0.19.5 // indirect
65+
github.com/go-openapi/jsonreference v0.19.5 // indirect
66+
github.com/go-openapi/swag v0.19.14 // indirect
6867
github.com/gogo/protobuf v1.3.2 // indirect
69-
github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e // indirect
68+
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
7069
github.com/google/go-cmp v0.5.5 // indirect
7170
github.com/google/gofuzz v1.1.0 // indirect
7271
github.com/google/uuid v1.1.5 // indirect
73-
github.com/googleapis/gnostic v0.5.1 // indirect
74-
github.com/hashicorp/golang-lru v0.5.4 // indirect
72+
github.com/googleapis/gnostic v0.5.5 // indirect
7573
github.com/hashicorp/hcl v1.0.0 // indirect
76-
github.com/imdario/mergo v0.3.10 // indirect
74+
github.com/imdario/mergo v0.3.12 // indirect
7775
github.com/inconshreveable/mousetrap v1.0.0 // indirect
7876
github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af // indirect
77+
github.com/josharian/intern v1.0.0 // indirect
7978
github.com/json-iterator/go v1.1.11 // indirect
8079
github.com/magiconair/properties v1.8.5 // indirect
81-
github.com/mailru/easyjson v0.7.0 // indirect
80+
github.com/mailru/easyjson v0.7.6 // indirect
8281
github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect
8382
github.com/mitchellh/mapstructure v1.4.1 // indirect
8483
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
@@ -88,8 +87,8 @@ require (
8887
github.com/pelletier/go-toml v1.9.3 // indirect
8988
github.com/pkg/errors v0.9.1 // indirect
9089
github.com/prometheus/client_model v0.2.0 // indirect
91-
github.com/prometheus/common v0.15.0 // indirect
92-
github.com/prometheus/procfs v0.2.0 // indirect
90+
github.com/prometheus/common v0.26.0 // indirect
91+
github.com/prometheus/procfs v0.6.0 // indirect
9392
github.com/spf13/afero v1.6.0 // indirect
9493
github.com/spf13/cast v1.3.1 // indirect
9594
github.com/spf13/jwalterweatherman v1.1.0 // indirect
@@ -100,17 +99,18 @@ require (
10099
github.com/vdemeester/k8s-pkg-credentialprovider v1.19.7 // indirect
101100
go.uber.org/atomic v1.7.0 // indirect
102101
go.uber.org/multierr v1.6.0 // indirect
103-
go.uber.org/zap v1.17.0 // indirect
104-
golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0 // indirect
102+
go.uber.org/zap v1.19.0 // indirect
103+
golang.org/x/crypto v0.0.0-20210220033148-5ea612d1eb83 // indirect
105104
golang.org/x/mod v0.4.2 // indirect
106105
golang.org/x/oauth2 v0.0.0-20210402161424-2e8d93401602 // indirect
107106
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c // indirect
108-
golang.org/x/sys v0.0.0-20210510120138-977fb7262007 // indirect
109-
golang.org/x/text v0.3.5 // indirect
110-
golang.org/x/time v0.0.0-20200630173020-3af7569d3a1e // indirect
107+
golang.org/x/sys v0.0.0-20210817190340-bfb29a6856f2 // indirect
108+
golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d // indirect
109+
golang.org/x/text v0.3.6 // indirect
110+
golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac // indirect
111111
golang.org/x/tools v0.1.2 // indirect
112112
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect
113-
gomodules.xyz/jsonpatch/v2 v2.1.0 // indirect
113+
gomodules.xyz/jsonpatch/v2 v2.2.0 // indirect
114114
gonum.org/v1/gonum v0.8.2 // indirect
115115
google.golang.org/appengine v1.6.7 // indirect
116116
google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c // indirect
@@ -121,12 +121,12 @@ require (
121121
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect
122122
gopkg.in/yaml.v2 v2.4.0 // indirect
123123
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect
124-
k8s.io/apiextensions-apiserver v0.20.1 // indirect
125-
k8s.io/component-base v0.20.2 // indirect
124+
k8s.io/apiextensions-apiserver v0.22.1 // indirect
125+
k8s.io/component-base v0.22.1 // indirect
126126
k8s.io/gengo v0.0.0-20201214224949-b6c5ce23f027 // indirect
127-
k8s.io/klog/v2 v2.8.0 // indirect
127+
k8s.io/klog/v2 v2.9.0 // indirect
128128
k8s.io/legacy-cloud-providers v0.19.7 // indirect
129-
k8s.io/utils v0.0.0-20210111153108-fddb29f9d009 // indirect
129+
k8s.io/utils v0.0.0-20210819203725-bdf08cb9a70a // indirect
130130
sigs.k8s.io/structured-merge-diff/v4 v4.1.2 // indirect
131131
sigs.k8s.io/yaml v1.2.0 // indirect
132132
)

0 commit comments

Comments
 (0)