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

dependency update #764

Merged
merged 5 commits into from
Nov 24, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
77 changes: 51 additions & 26 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,44 +3,69 @@ module github.com/intel/pmem-csi
go 1.13

require (
github.com/aws/aws-sdk-go v1.35.0 // indirect
github.com/blang/semver v3.5.1+incompatible // indirect
github.com/container-storage-interface/spec v1.2.0
github.com/container-storage-interface/spec v1.3.0
github.com/coreos/go-systemd v0.0.0-20190620071333-e64a0ec8b42a // indirect
github.com/docker/spdystream v0.0.0-20181023171402-6480d4af844c // indirect
github.com/emicklei/go-restful v2.9.6+incompatible // indirect
github.com/go-bindata/go-bindata v3.1.2+incompatible
github.com/go-logr/logr v0.2.1-0.20200730175230-ee2de8da5be6
github.com/go-logr/logr v0.2.1
github.com/go-logr/zapr v0.2.0 // indirect
github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e // indirect
github.com/golang/protobuf v1.4.2
github.com/google/uuid v1.1.1
github.com/google/go-cmp v0.5.2 // indirect
github.com/google/gofuzz v1.2.0 // indirect
github.com/google/uuid v1.1.2
github.com/googleapis/gnostic v0.5.1 // indirect
github.com/grpc-ecosystem/go-grpc-middleware v1.1.0 // indirect
github.com/kubernetes-csi/csi-lib-utils v0.8.0
github.com/kubernetes-csi/csi-test/v3 v3.1.0
github.com/onsi/ginkgo v1.12.1
github.com/onsi/gomega v1.10.1
github.com/operator-framework/operator-sdk v0.8.2
github.com/grpc-ecosystem/grpc-gateway v1.12.1 // indirect
github.com/imdario/mergo v0.3.11 // indirect
github.com/kubernetes-csi/csi-lib-utils v0.9.0
github.com/kubernetes-csi/csi-test/v3 v3.1.1
github.com/nxadm/tail v1.4.5 // indirect
github.com/onsi/ginkgo v1.14.1
github.com/onsi/gomega v1.10.2
github.com/opencontainers/go-digest v1.0.0 // indirect
github.com/operator-framework/operator-lib v0.1.0
github.com/prometheus/client_golang v1.7.1
github.com/prometheus/common v0.10.0
github.com/stretchr/testify v1.5.1
go.uber.org/multierr v1.2.0 // indirect
go.uber.org/zap v1.11.0 // indirect
golang.org/x/net v0.0.0-20200707034311-ab3426394381
golang.org/x/sys v0.0.0-20200622214017-ed371f2e16b4
google.golang.org/genproto v0.0.0-20200619004808-3e7fca5c55db // indirect
github.com/prometheus/common v0.14.0
github.com/prometheus/procfs v0.2.0 // indirect
github.com/stretchr/testify v1.6.1
go.uber.org/multierr v1.6.0 // indirect
go.uber.org/zap v1.16.0 // indirect
golang.org/x/crypto v0.0.0-20200930160638-afb6bcd081ae // indirect
golang.org/x/lint v0.0.0-20200302205851-738671d3881b // indirect
golang.org/x/net v0.0.0-20200930145003-4acb6c075d10
golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d // indirect
golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f
golang.org/x/time v0.0.0-20200630173020-3af7569d3a1e // indirect
golang.org/x/tools v0.0.0-20200825202427-b303f430e36d // indirect
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect
gomodules.xyz/jsonpatch/v2 v2.1.0 // indirect
google.golang.org/appengine v1.6.6 // indirect
google.golang.org/genproto v0.0.0-20200930140634-01fc692af84b // indirect
google.golang.org/grpc v1.29.1
google.golang.org/protobuf v1.25.0 // indirect
gopkg.in/freddierice/go-losetup.v1 v1.0.0-20170407175016-fc9adea44124
gopkg.in/yaml.v2 v2.3.0
k8s.io/api v0.19.0
k8s.io/apiextensions-apiserver v0.19.0
k8s.io/apimachinery v0.19.1-rc.0
k8s.io/client-go v1.19.0
k8s.io/component-base v0.19.0
k8s.io/klog/v2 v2.2.0
k8s.io/kube-scheduler v0.19.0
k8s.io/kubectl v0.19.0
k8s.io/kubernetes v1.19.0
k8s.io/utils v0.0.0-20200729134348-d5654de09c73
sigs.k8s.io/controller-runtime v0.6.2
honnef.co/go/tools v0.0.1-2020.1.4 // indirect
k8s.io/api v0.19.2
k8s.io/apiextensions-apiserver v0.19.2
k8s.io/apimachinery v0.19.2
k8s.io/apiserver v0.19.2 // indirect
k8s.io/client-go v12.0.0+incompatible
k8s.io/cloud-provider v0.19.2 // indirect
k8s.io/component-base v0.19.2
k8s.io/csi-translation-lib v0.19.2 // indirect
k8s.io/klog/v2 v2.3.0
k8s.io/kube-openapi v0.0.0-20200923155610-8b5066479488 // indirect
k8s.io/kube-scheduler v0.19.2
k8s.io/kubectl v0.19.2
k8s.io/kubernetes v1.19.2
k8s.io/utils v0.0.0-20200912215256-4140de9c8800
sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.12 // indirect
sigs.k8s.io/controller-runtime v0.6.3
)

replace (
Expand Down
269 changes: 250 additions & 19 deletions go.sum

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions pkg/pmem-csi-driver/controllerserver-master.go
Original file line number Diff line number Diff line change
Expand Up @@ -520,3 +520,7 @@ func (cs *masterController) getVolumeByName(Name string) *volume {
func (cs *masterController) ControllerExpandVolume(context.Context, *csi.ControllerExpandVolumeRequest) (*csi.ControllerExpandVolumeResponse, error) {
return nil, status.Error(codes.Unimplemented, "")
}

func (cs *masterController) ControllerGetVolume(context.Context, *csi.ControllerGetVolumeRequest) (*csi.ControllerGetVolumeResponse, error) {
return nil, status.Error(codes.Unimplemented, "")
}
4 changes: 4 additions & 0 deletions pkg/pmem-csi-driver/controllerserver-node.go
Original file line number Diff line number Diff line change
Expand Up @@ -432,3 +432,7 @@ func (cs *nodeControllerServer) getVolumeByName(volumeName string) *nodeVolume {
func (cs *nodeControllerServer) ControllerExpandVolume(context.Context, *csi.ControllerExpandVolumeRequest) (*csi.ControllerExpandVolumeResponse, error) {
return nil, status.Error(codes.Unimplemented, "")
}

func (cs *nodeControllerServer) ControllerGetVolume(context.Context, *csi.ControllerGetVolumeRequest) (*csi.ControllerGetVolumeResponse, error) {
return nil, status.Error(codes.Unimplemented, "")
}
6 changes: 5 additions & 1 deletion pkg/pmem-csi-driver/pmem-csi-driver.go
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,10 @@ func (csid *csiDriver) Run() error {

// On the csi.sock endpoint we gather statistics for incoming
// CSI method calls like any other CSI driver.
cmm := metrics.NewCSIMetricsManagerForPlugin(csid.cfg.DriverName)
cmm := metrics.NewCSIMetricsManagerWithOptions(csid.cfg.DriverName,
metrics.WithProcessStartTime(false),
metrics.WithSubsystem(metrics.SubsystemPlugin),
)
csid.gatherers = append(csid.gatherers, cmm.GetRegistry())

switch csid.cfg.Mode {
Expand Down Expand Up @@ -346,6 +349,7 @@ func (csid *csiDriver) Run() error {
// corresponding client calls use "pmem_csi_controller" with
// a tag that identifies the node that is being called.
cmmInternal := metrics.NewCSIMetricsManagerWithOptions(csid.cfg.DriverName,
metrics.WithProcessStartTime(false),
metrics.WithSubsystem("pmem_csi_node"),
// Always add the instance label to allow correlating with
// the controller calls.
Expand Down
6 changes: 6 additions & 0 deletions pkg/pmem-csi-driver/pmem-csi-driver_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ import (
"os"
"testing"

"k8s.io/klog/v2"

"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
Expand All @@ -25,6 +27,10 @@ var (
keyFile = os.ExpandEnv("${TEST_WORK}/pmem-ca/pmem-registry-key.pem")
)

func init() {
klog.InitFlags(nil)
}

func TestMetrics(t *testing.T) {
cases := map[string]struct {
path string
Expand Down
9 changes: 2 additions & 7 deletions pkg/pmem-csi-operator/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,9 @@ import (
"github.com/intel/pmem-csi/pkg/k8sutil"
"github.com/intel/pmem-csi/pkg/pmem-csi-operator/controller"

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

"github.com/operator-framework/operator-sdk/pkg/leader"
"github.com/operator-framework/operator-sdk/pkg/restmapper"
sdkVersion "github.com/operator-framework/operator-sdk/version"
"github.com/operator-framework/operator-lib/leader"
"sigs.k8s.io/controller-runtime/pkg/client/config"
"sigs.k8s.io/controller-runtime/pkg/manager"
"sigs.k8s.io/controller-runtime/pkg/manager/signals"
Expand All @@ -38,7 +35,6 @@ func printVersion() {
//klog.Info(fmt.Sprintf("Operator Version: %s", version.Version))
klog.Info(fmt.Sprintf("Go Version: %s", runtime.Version()))
klog.Info(fmt.Sprintf("Go OS/Arch: %s/%s", runtime.GOOS, runtime.GOARCH))
klog.Info(fmt.Sprintf("Version of operator-sdk: %v", sdkVersion.Version))
}

var driverImage string
Expand Down Expand Up @@ -75,8 +71,7 @@ func Main() int {

// Create a new Cmd to provide shared dependencies and start components
mgr, err := manager.New(cfg, manager.Options{
Namespace: namespace,
MapperProvider: restmapper.NewDynamicRESTMapper,
Namespace: namespace,
})
if err != nil {
pmemcommon.ExitError("Failed to create controller manager: ", err)
Expand Down
1 change: 1 addition & 0 deletions pkg/registryserver/registryserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ func New(tlsConfig *tls.Config, driverName string) *RegistryServer {
nodeClients: map[string]*NodeInfo{},
listeners: map[RegistryListener]struct{}{},
cmm: metrics.NewCSIMetricsManagerWithOptions(driverName,
metrics.WithProcessStartTime(false),
metrics.WithSubsystem("pmem_csi_controller"),
metrics.WithLabelNames(NodeLabel),
),
Expand Down
2 changes: 1 addition & 1 deletion runtime-deps.csv
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Go,https://github.com/golang/go,9051
client_golang,https://github.com/prometheus/client_golang,
github.com/operator-framework/operator-lib
golang-protobuf,https://github.com/golang/protobuf,
google uuid,https://github.com/google/uuid,
grpc-go,https://github.com/grpc/grpc-go,
kubernetes,https://github.com/kubernetes/kubernetes,9641
kubernetes-sigs/controller-runtime,https://github.com/kubernetes-sigs/controller-runtime,
operator-sdk,https://github.com/operator-framework/operator-sdk,
10 changes: 9 additions & 1 deletion test/e2e/deploy/deploy.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import (
"context"
"crypto/tls"
"fmt"
"io/ioutil"
"net"
"net/http"
"os"
Expand Down Expand Up @@ -151,7 +152,12 @@ func WaitForPMEMDriver(c *Cluster, name string, d *Deployment) (metricsURL strin
return fmt.Errorf("get controller metrics: %v", err)
}
if resp.StatusCode != 200 {
return fmt.Errorf("HTTP GET %s failed: %d", metricsURL, resp.StatusCode)
body, _ := ioutil.ReadAll(resp.Body)
suffix := ""
if len(body) > 0 {
suffix = "\n" + string(body)
}
return fmt.Errorf("HTTP GET %s failed: %d%s", metricsURL, resp.StatusCode, suffix)
}

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