Skip to content
This repository was archived by the owner on Oct 22, 2024. It is now read-only.

Commit fd40020

Browse files
authored
Merge pull request #764 from pohly/dependencies
dependency update
2 parents 385469f + 4a70dae commit fd40020

File tree

10 files changed

+333
-55
lines changed

10 files changed

+333
-55
lines changed

go.mod

Lines changed: 51 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -3,44 +3,69 @@ module github.com/intel/pmem-csi
33
go 1.13
44

55
require (
6+
github.com/aws/aws-sdk-go v1.35.0 // indirect
67
github.com/blang/semver v3.5.1+incompatible // indirect
7-
github.com/container-storage-interface/spec v1.2.0
8+
github.com/container-storage-interface/spec v1.3.0
89
github.com/coreos/go-systemd v0.0.0-20190620071333-e64a0ec8b42a // indirect
910
github.com/docker/spdystream v0.0.0-20181023171402-6480d4af844c // indirect
1011
github.com/emicklei/go-restful v2.9.6+incompatible // indirect
1112
github.com/go-bindata/go-bindata v3.1.2+incompatible
12-
github.com/go-logr/logr v0.2.1-0.20200730175230-ee2de8da5be6
13+
github.com/go-logr/logr v0.2.1
1314
github.com/go-logr/zapr v0.2.0 // indirect
15+
github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e // indirect
1416
github.com/golang/protobuf v1.4.2
15-
github.com/google/uuid v1.1.1
17+
github.com/google/go-cmp v0.5.2 // indirect
18+
github.com/google/gofuzz v1.2.0 // indirect
19+
github.com/google/uuid v1.1.2
20+
github.com/googleapis/gnostic v0.5.1 // indirect
1621
github.com/grpc-ecosystem/go-grpc-middleware v1.1.0 // indirect
17-
github.com/kubernetes-csi/csi-lib-utils v0.8.0
18-
github.com/kubernetes-csi/csi-test/v3 v3.1.0
19-
github.com/onsi/ginkgo v1.12.1
20-
github.com/onsi/gomega v1.10.1
21-
github.com/operator-framework/operator-sdk v0.8.2
22+
github.com/grpc-ecosystem/grpc-gateway v1.12.1 // indirect
23+
github.com/imdario/mergo v0.3.11 // indirect
24+
github.com/kubernetes-csi/csi-lib-utils v0.9.0
25+
github.com/kubernetes-csi/csi-test/v3 v3.1.1
26+
github.com/nxadm/tail v1.4.5 // indirect
27+
github.com/onsi/ginkgo v1.14.1
28+
github.com/onsi/gomega v1.10.2
29+
github.com/opencontainers/go-digest v1.0.0 // indirect
30+
github.com/operator-framework/operator-lib v0.1.0
2231
github.com/prometheus/client_golang v1.7.1
23-
github.com/prometheus/common v0.10.0
24-
github.com/stretchr/testify v1.5.1
25-
go.uber.org/multierr v1.2.0 // indirect
26-
go.uber.org/zap v1.11.0 // indirect
27-
golang.org/x/net v0.0.0-20200707034311-ab3426394381
28-
golang.org/x/sys v0.0.0-20200622214017-ed371f2e16b4
29-
google.golang.org/genproto v0.0.0-20200619004808-3e7fca5c55db // indirect
32+
github.com/prometheus/common v0.14.0
33+
github.com/prometheus/procfs v0.2.0 // indirect
34+
github.com/stretchr/testify v1.6.1
35+
go.uber.org/multierr v1.6.0 // indirect
36+
go.uber.org/zap v1.16.0 // indirect
37+
golang.org/x/crypto v0.0.0-20200930160638-afb6bcd081ae // indirect
38+
golang.org/x/lint v0.0.0-20200302205851-738671d3881b // indirect
39+
golang.org/x/net v0.0.0-20200930145003-4acb6c075d10
40+
golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d // indirect
41+
golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f
42+
golang.org/x/time v0.0.0-20200630173020-3af7569d3a1e // indirect
43+
golang.org/x/tools v0.0.0-20200825202427-b303f430e36d // indirect
44+
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect
45+
gomodules.xyz/jsonpatch/v2 v2.1.0 // indirect
46+
google.golang.org/appengine v1.6.6 // indirect
47+
google.golang.org/genproto v0.0.0-20200930140634-01fc692af84b // indirect
3048
google.golang.org/grpc v1.29.1
49+
google.golang.org/protobuf v1.25.0 // indirect
3150
gopkg.in/freddierice/go-losetup.v1 v1.0.0-20170407175016-fc9adea44124
3251
gopkg.in/yaml.v2 v2.3.0
33-
k8s.io/api v0.19.0
34-
k8s.io/apiextensions-apiserver v0.19.0
35-
k8s.io/apimachinery v0.19.1-rc.0
36-
k8s.io/client-go v1.19.0
37-
k8s.io/component-base v0.19.0
38-
k8s.io/klog/v2 v2.2.0
39-
k8s.io/kube-scheduler v0.19.0
40-
k8s.io/kubectl v0.19.0
41-
k8s.io/kubernetes v1.19.0
42-
k8s.io/utils v0.0.0-20200729134348-d5654de09c73
43-
sigs.k8s.io/controller-runtime v0.6.2
52+
honnef.co/go/tools v0.0.1-2020.1.4 // indirect
53+
k8s.io/api v0.19.2
54+
k8s.io/apiextensions-apiserver v0.19.2
55+
k8s.io/apimachinery v0.19.2
56+
k8s.io/apiserver v0.19.2 // indirect
57+
k8s.io/client-go v12.0.0+incompatible
58+
k8s.io/cloud-provider v0.19.2 // indirect
59+
k8s.io/component-base v0.19.2
60+
k8s.io/csi-translation-lib v0.19.2 // indirect
61+
k8s.io/klog/v2 v2.3.0
62+
k8s.io/kube-openapi v0.0.0-20200923155610-8b5066479488 // indirect
63+
k8s.io/kube-scheduler v0.19.2
64+
k8s.io/kubectl v0.19.2
65+
k8s.io/kubernetes v1.19.2
66+
k8s.io/utils v0.0.0-20200912215256-4140de9c8800
67+
sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.12 // indirect
68+
sigs.k8s.io/controller-runtime v0.6.3
4469
)
4570

4671
replace (

go.sum

Lines changed: 250 additions & 19 deletions
Large diffs are not rendered by default.

pkg/pmem-csi-driver/controllerserver-master.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -520,3 +520,7 @@ func (cs *masterController) getVolumeByName(Name string) *volume {
520520
func (cs *masterController) ControllerExpandVolume(context.Context, *csi.ControllerExpandVolumeRequest) (*csi.ControllerExpandVolumeResponse, error) {
521521
return nil, status.Error(codes.Unimplemented, "")
522522
}
523+
524+
func (cs *masterController) ControllerGetVolume(context.Context, *csi.ControllerGetVolumeRequest) (*csi.ControllerGetVolumeResponse, error) {
525+
return nil, status.Error(codes.Unimplemented, "")
526+
}

pkg/pmem-csi-driver/controllerserver-node.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -432,3 +432,7 @@ func (cs *nodeControllerServer) getVolumeByName(volumeName string) *nodeVolume {
432432
func (cs *nodeControllerServer) ControllerExpandVolume(context.Context, *csi.ControllerExpandVolumeRequest) (*csi.ControllerExpandVolumeResponse, error) {
433433
return nil, status.Error(codes.Unimplemented, "")
434434
}
435+
436+
func (cs *nodeControllerServer) ControllerGetVolume(context.Context, *csi.ControllerGetVolumeRequest) (*csi.ControllerGetVolumeResponse, error) {
437+
return nil, status.Error(codes.Unimplemented, "")
438+
}

pkg/pmem-csi-driver/pmem-csi-driver.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,10 @@ func (csid *csiDriver) Run() error {
309309

310310
// On the csi.sock endpoint we gather statistics for incoming
311311
// CSI method calls like any other CSI driver.
312-
cmm := metrics.NewCSIMetricsManagerForPlugin(csid.cfg.DriverName)
312+
cmm := metrics.NewCSIMetricsManagerWithOptions(csid.cfg.DriverName,
313+
metrics.WithProcessStartTime(false),
314+
metrics.WithSubsystem(metrics.SubsystemPlugin),
315+
)
313316
csid.gatherers = append(csid.gatherers, cmm.GetRegistry())
314317

315318
switch csid.cfg.Mode {
@@ -346,6 +349,7 @@ func (csid *csiDriver) Run() error {
346349
// corresponding client calls use "pmem_csi_controller" with
347350
// a tag that identifies the node that is being called.
348351
cmmInternal := metrics.NewCSIMetricsManagerWithOptions(csid.cfg.DriverName,
352+
metrics.WithProcessStartTime(false),
349353
metrics.WithSubsystem("pmem_csi_node"),
350354
// Always add the instance label to allow correlating with
351355
// the controller calls.

pkg/pmem-csi-driver/pmem-csi-driver_test.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ import (
1515
"os"
1616
"testing"
1717

18+
"k8s.io/klog/v2"
19+
1820
"github.com/stretchr/testify/assert"
1921
"github.com/stretchr/testify/require"
2022
)
@@ -25,6 +27,10 @@ var (
2527
keyFile = os.ExpandEnv("${TEST_WORK}/pmem-ca/pmem-registry-key.pem")
2628
)
2729

30+
func init() {
31+
klog.InitFlags(nil)
32+
}
33+
2834
func TestMetrics(t *testing.T) {
2935
cases := map[string]struct {
3036
path string

pkg/pmem-csi-operator/main.go

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,9 @@ import (
2020
"github.com/intel/pmem-csi/pkg/k8sutil"
2121
"github.com/intel/pmem-csi/pkg/pmem-csi-operator/controller"
2222

23-
//"github.com/intel/pmem-csi/pkg/pmem-operator/version"
2423
pmemcommon "github.com/intel/pmem-csi/pkg/pmem-common"
2524

26-
"github.com/operator-framework/operator-sdk/pkg/leader"
27-
"github.com/operator-framework/operator-sdk/pkg/restmapper"
28-
sdkVersion "github.com/operator-framework/operator-sdk/version"
25+
"github.com/operator-framework/operator-lib/leader"
2926
"sigs.k8s.io/controller-runtime/pkg/client/config"
3027
"sigs.k8s.io/controller-runtime/pkg/manager"
3128
"sigs.k8s.io/controller-runtime/pkg/manager/signals"
@@ -38,7 +35,6 @@ func printVersion() {
3835
//klog.Info(fmt.Sprintf("Operator Version: %s", version.Version))
3936
klog.Info(fmt.Sprintf("Go Version: %s", runtime.Version()))
4037
klog.Info(fmt.Sprintf("Go OS/Arch: %s/%s", runtime.GOOS, runtime.GOARCH))
41-
klog.Info(fmt.Sprintf("Version of operator-sdk: %v", sdkVersion.Version))
4238
}
4339

4440
var driverImage string
@@ -75,8 +71,7 @@ func Main() int {
7571

7672
// Create a new Cmd to provide shared dependencies and start components
7773
mgr, err := manager.New(cfg, manager.Options{
78-
Namespace: namespace,
79-
MapperProvider: restmapper.NewDynamicRESTMapper,
74+
Namespace: namespace,
8075
})
8176
if err != nil {
8277
pmemcommon.ExitError("Failed to create controller manager: ", err)

pkg/registryserver/registryserver.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ func New(tlsConfig *tls.Config, driverName string) *RegistryServer {
8080
nodeClients: map[string]*NodeInfo{},
8181
listeners: map[RegistryListener]struct{}{},
8282
cmm: metrics.NewCSIMetricsManagerWithOptions(driverName,
83+
metrics.WithProcessStartTime(false),
8384
metrics.WithSubsystem("pmem_csi_controller"),
8485
metrics.WithLabelNames(NodeLabel),
8586
),

runtime-deps.csv

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
Go,https://github.com/golang/go,9051
22
client_golang,https://github.com/prometheus/client_golang,
3+
github.com/operator-framework/operator-lib
34
golang-protobuf,https://github.com/golang/protobuf,
45
google uuid,https://github.com/google/uuid,
56
grpc-go,https://github.com/grpc/grpc-go,
67
kubernetes,https://github.com/kubernetes/kubernetes,9641
78
kubernetes-sigs/controller-runtime,https://github.com/kubernetes-sigs/controller-runtime,
8-
operator-sdk,https://github.com/operator-framework/operator-sdk,

test/e2e/deploy/deploy.go

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import (
1111
"context"
1212
"crypto/tls"
1313
"fmt"
14+
"io/ioutil"
1415
"net"
1516
"net/http"
1617
"os"
@@ -151,7 +152,12 @@ func WaitForPMEMDriver(c *Cluster, name string, d *Deployment) (metricsURL strin
151152
return fmt.Errorf("get controller metrics: %v", err)
152153
}
153154
if resp.StatusCode != 200 {
154-
return fmt.Errorf("HTTP GET %s failed: %d", metricsURL, resp.StatusCode)
155+
body, _ := ioutil.ReadAll(resp.Body)
156+
suffix := ""
157+
if len(body) > 0 {
158+
suffix = "\n" + string(body)
159+
}
160+
return fmt.Errorf("HTTP GET %s failed: %d%s", metricsURL, resp.StatusCode, suffix)
155161
}
156162

157163
// Parse and check number of connected nodes. Dump the
@@ -1057,7 +1063,9 @@ func Describe(deployment, describe, what string, f func(d *Deployment)) bool {
10571063
// DefineTests must be called to register all tests defined so far via Describe.
10581064
func DefineTests() {
10591065
for deploymentName, group := range tests {
1066+
deploymentName := deploymentName
10601067
for describe, funcs := range group {
1068+
funcs := funcs
10611069
ginkgo.Describe(describe, func() {
10621070
deployment := EnsureDeployment(deploymentName)
10631071
for _, f := range funcs {

0 commit comments

Comments
 (0)