Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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