Skip to content

Commit

Permalink
Merge pull request kubernetes-csi#101 from jsafrane/csinodeinfo
Browse files Browse the repository at this point in the history
Update CSINodeInfo
  • Loading branch information
k8s-ci-robot authored Nov 27, 2018
2 parents 0b6bb40 + bd150bf commit af1e619
Show file tree
Hide file tree
Showing 536 changed files with 23,680 additions and 9,730 deletions.
195 changes: 47 additions & 148 deletions Gopkg.lock

Large diffs are not rendered by default.

22 changes: 14 additions & 8 deletions Gopkg.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,24 @@
name = "google.golang.org/grpc"
version = "1.9.2"

[[constraint]]
[[override]]
name = "github.com/json-iterator/go"
version = "1.1.4"

// TODO: use [[constraint]] when kubernetes-csi/kubernetes-csi-migration-library uses 1.13 code
[[override]]
name = "k8s.io/api"
version = "kubernetes-1.12.1"
version = "kubernetes-1.13.0-beta.2"

[[constraint]]
[[override]]
name = "k8s.io/apimachinery"
version = "kubernetes-1.12.0"
version = "kubernetes-1.13.0-beta.2"

[[constraint]]
[[override]]
name = "k8s.io/client-go"
version = "kubernetes-1.12.0"
version = "kubernetes-1.13.0-beta.2"


[[override]]
name = "github.com/json-iterator/go"
version = "1.1.4"
name = "k8s.io/csi-api"
version = "kubernetes-1.13.0-beta.2"
9 changes: 4 additions & 5 deletions pkg/controller/csi_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ import (

"github.com/golang/glog"

"github.com/kubernetes-csi/external-attacher/pkg/connection"

csiMigration "github.com/kubernetes-csi/kubernetes-csi-migration-library"
"k8s.io/api/core/v1"
storage "k8s.io/api/storage/v1beta1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
Expand All @@ -31,12 +34,8 @@ import (
corelisters "k8s.io/client-go/listers/core/v1"
storagelisters "k8s.io/client-go/listers/storage/v1beta1"
"k8s.io/client-go/util/workqueue"
csilisters "k8s.io/csi-api/pkg/client/listers/csi/v1alpha1"

"github.com/kubernetes-csi/external-attacher/pkg/connection"

csiMigration "github.com/kubernetes-csi/kubernetes-csi-migration-library"
csiclient "k8s.io/csi-api/pkg/client/clientset/versioned"
csilisters "k8s.io/csi-api/pkg/client/listers/csi/v1alpha1"
)

// csiHandler is a handler that calls CSI to attach/detach volume.
Expand Down
12 changes: 7 additions & 5 deletions pkg/controller/csi_handler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -187,10 +187,12 @@ func csiNodeInfo() *csiapi.CSINodeInfo {
ObjectMeta: metav1.ObjectMeta{
Name: testNodeName,
},
CSIDrivers: []csiapi.CSIDriverInfo{
{
Driver: testAttacherName,
NodeID: testNodeID,
Spec: csiapi.CSINodeInfoSpec{
Drivers: []csiapi.CSIDriverInfoSpec{
{
Name: testAttacherName,
NodeID: testNodeID,
},
},
},
}
Expand All @@ -201,7 +203,7 @@ func csiNodeInfoEmpty() *csiapi.CSINodeInfo {
ObjectMeta: metav1.ObjectMeta{
Name: testNodeName,
},
CSIDrivers: []csiapi.CSIDriverInfo{},
Spec: csiapi.CSINodeInfoSpec{Drivers: []csiapi.CSIDriverInfoSpec{}},
}
}

Expand Down
4 changes: 2 additions & 2 deletions pkg/controller/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,8 @@ func GetNodeIDFromNode(driver string, node *v1.Node) (string, error) {
}

func GetNodeIDFromNodeInfo(driver string, nodeInfo *csiapi.CSINodeInfo) (string, bool) {
for _, d := range nodeInfo.CSIDrivers {
if d.Driver == driver {
for _, d := range nodeInfo.Spec.Drivers {
if d.Name == driver {
return d.NodeID, true
}
}
Expand Down
16 changes: 16 additions & 0 deletions vendor/github.com/evanphx/json-patch/.travis.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

25 changes: 25 additions & 0 deletions vendor/github.com/evanphx/json-patch/LICENSE

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit af1e619

Please sign in to comment.