Skip to content

Commit 5183e46

Browse files
authored
Merge pull request #646 from mythi/PR-2021-033
move to k8s.io v1.21.1 and controller-runtime v0.9.0
2 parents e180bfd + b66b217 commit 5183e46

9 files changed

+106
-190
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ Prerequisites for building and running these device plugins include:
3636

3737
- Appropriate hardware
3838
- A fully configured [Kubernetes cluster]
39-
- A working [Go environment], of at least version v1.15.
39+
- A working [Go environment], of at least version v1.16.
4040

4141
## Plugins
4242

go.mod

Lines changed: 18 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -7,34 +7,29 @@ require (
77
github.com/go-ini/ini v1.62.0
88
github.com/go-logr/logr v0.4.0
99
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
10-
github.com/golang/protobuf v1.5.2 // indirect
10+
github.com/google/go-cmp v0.5.6 // indirect
1111
github.com/google/gofuzz v1.2.0 // indirect
1212
github.com/google/gousb v1.1.0
1313
github.com/google/uuid v1.2.0 // indirect
14-
github.com/imdario/mergo v0.3.12 // indirect
15-
github.com/klauspost/cpuid/v2 v2.0.2
16-
github.com/onsi/ginkgo v1.15.0
17-
github.com/onsi/gomega v1.10.5
14+
github.com/klauspost/cpuid/v2 v2.0.6
15+
github.com/onsi/ginkgo v1.16.4
16+
github.com/onsi/gomega v1.13.0
1817
github.com/pkg/errors v0.9.1
19-
github.com/prometheus/client_golang v1.10.0 // indirect
20-
github.com/prometheus/common v0.20.0 // indirect
21-
golang.org/x/net v0.0.0-20210415231046-e915ea6b2b7d // indirect
22-
golang.org/x/oauth2 v0.0.0-20210413134643-5e61552d6c78 // indirect
23-
golang.org/x/sys v0.0.0-20210415045647-66c3f260301c
24-
golang.org/x/term v0.0.0-20210406210042-72f3dc4e9b72 // indirect
18+
github.com/prometheus/common v0.28.0 // indirect
19+
golang.org/x/sys v0.0.0-20210608053332-aa57babbf139
20+
golang.org/x/term v0.0.0-20210503060354-a79de5458b56 // indirect
21+
golang.org/x/time v0.0.0-20210608053304-ed9ce3a009e4 // indirect
2522
google.golang.org/grpc v1.31.0
26-
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect
27-
k8s.io/api v0.21.0
28-
k8s.io/apiextensions-apiserver v0.21.0 // indirect
29-
k8s.io/apimachinery v0.21.0
30-
k8s.io/client-go v1.5.2
31-
k8s.io/component-base v0.21.0
32-
k8s.io/klog/v2 v2.8.0
33-
k8s.io/kube-openapi v0.0.0-20210323165736-1a6458611d18 // indirect
34-
k8s.io/kubelet v0.21.0
35-
k8s.io/kubernetes v1.21.0
36-
k8s.io/utils v0.0.0-20210305010621-2afb4311ab10
37-
sigs.k8s.io/controller-runtime v0.9.0-alpha.1
23+
k8s.io/api v0.21.1
24+
k8s.io/apimachinery v0.21.1
25+
k8s.io/client-go v0.21.1
26+
k8s.io/component-base v0.21.1
27+
k8s.io/klog/v2 v2.9.0
28+
k8s.io/kube-openapi v0.0.0-20210527164424-3c818078ee3d // indirect
29+
k8s.io/kubelet v0.21.1
30+
k8s.io/kubernetes v1.21.1
31+
k8s.io/utils v0.0.0-20210527160623-6fdb442a123b
32+
sigs.k8s.io/controller-runtime v0.9.0
3833
sigs.k8s.io/structured-merge-diff/v4 v4.1.1 // indirect
3934
)
4035

go.sum

Lines changed: 59 additions & 160 deletions
Large diffs are not rendered by default.

test/envtest/dsadeviceplugin_controller_test.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,11 @@ var _ = Describe("DsaDevicePlugin Controller", func() {
3131
const timeout = time.Second * 30
3232
const interval = time.Second * 1
3333

34+
AfterEach(func() {
35+
time.Sleep(time.Second * 2)
36+
37+
})
38+
3439
Context("Basic CRUD operations", func() {
3540
It("should handle DsaDevicePlugin objects correctly", func() {
3641
spec := devicepluginv1.DsaDevicePluginSpec{

test/envtest/fpgadeviceplugin_controller_test.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,11 @@ var _ = Describe("FpgaDevicePlugin Controller", func() {
3131
const timeout = time.Second * 30
3232
const interval = time.Second * 1
3333

34+
AfterEach(func() {
35+
time.Sleep(time.Second * 2)
36+
37+
})
38+
3439
Context("Basic CRUD operations", func() {
3540
It("should handle FpgaDevicePlugin objects correctly", func() {
3641
spec := devicepluginv1.FpgaDevicePluginSpec{

test/envtest/gpudeviceplugin_controller_test.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,11 @@ var _ = Describe("GpuDevicePlugin Controller", func() {
3131
const timeout = time.Second * 30
3232
const interval = time.Second * 1
3333

34+
AfterEach(func() {
35+
time.Sleep(time.Second * 2)
36+
37+
})
38+
3439
Context("Basic CRUD operations", func() {
3540
It("should handle GpuDevicePlugin objects correctly", func() {
3641
spec := devicepluginv1.GpuDevicePluginSpec{

test/envtest/qatdeviceplugin_controller_test.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,11 @@ var _ = Describe("QatDevicePlugin Controller", func() {
3131
const timeout = time.Second * 30
3232
const interval = time.Second * 1
3333

34+
AfterEach(func() {
35+
time.Sleep(time.Second * 2)
36+
37+
})
38+
3439
Context("Basic CRUD operations", func() {
3540
It("should handle QatDevicePlugin objects correctly", func() {
3641
spec := devicepluginv1.QatDevicePluginSpec{

test/envtest/sgxdeviceplugin_controller_test.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,11 @@ var _ = Describe("SgxDevicePlugin Controller", func() {
3131
const timeout = time.Second * 30
3232
const interval = time.Second * 1
3333

34+
AfterEach(func() {
35+
time.Sleep(time.Second * 2)
36+
37+
})
38+
3439
Context("Basic CRUD operations", func() {
3540
It("should handle SgxDevicePlugin objects correctly", func() {
3641
spec := devicepluginv1.SgxDevicePluginSpec{

test/envtest/suite_test.go

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ import (
2727
ctrl "sigs.k8s.io/controller-runtime"
2828
"sigs.k8s.io/controller-runtime/pkg/client"
2929
"sigs.k8s.io/controller-runtime/pkg/envtest"
30-
"sigs.k8s.io/controller-runtime/pkg/envtest/printer"
3130
logf "sigs.k8s.io/controller-runtime/pkg/log"
3231

3332
devicepluginv1 "github.com/intel/intel-device-plugins-for-kubernetes/pkg/apis/deviceplugin/v1"
@@ -49,12 +48,11 @@ var testEnv *envtest.Environment
4948
func TestAPIs(t *testing.T) {
5049
RegisterFailHandler(Fail)
5150

52-
RunSpecsWithDefaultAndCustomReporters(t,
53-
"Controller Suite",
54-
[]Reporter{printer.NewlineReporter{}})
51+
RunSpecs(t,
52+
"Controller Suite")
5553
}
5654

57-
var _ = BeforeSuite(func(done Done) {
55+
var _ = BeforeSuite(func() {
5856
logf.SetLogger(klogr.New())
5957

6058
By("bootstrapping test environment")
@@ -98,7 +96,6 @@ var _ = BeforeSuite(func(done Done) {
9896
k8sClient = k8sManager.GetClient()
9997
Expect(k8sClient).ToNot(BeNil())
10098

101-
close(done)
10299
}, 60)
103100

104101
var _ = AfterSuite(func() {

0 commit comments

Comments
 (0)