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

Update to CSI 1.0 #122

Merged
merged 7 commits into from
Nov 29, 2018
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
8 changes: 4 additions & 4 deletions deploy/kubernetes/v1.12+/attacher.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@ rules:
- apiGroups: [""]
resources: ["secrets"]
verbs: ["get", "list"]
- apiGroups: [""]
resources: ["events"]
verbs: ["get", "list", "watch", "update"]
- apiGroups: [""]
resources: ["persistentvolumes"]
verbs: ["get", "list", "watch", "update"]
Expand All @@ -27,6 +24,9 @@ rules:
- apiGroups: ["storage.k8s.io"]
resources: ["volumeattachments"]
verbs: ["get", "list", "watch", "update"]
- apiGroups: ["csi.storage.k8s.io"]
resources: ["csinodeinfos"]
verbs: ["get", "list", "watch"]

bertinatto marked this conversation as resolved.
Show resolved Hide resolved
---

Expand Down Expand Up @@ -78,7 +78,7 @@ spec:
capabilities:
add: ["SYS_ADMIN"]
allowPrivilegeEscalation: true
image: quay.io/k8scsi/csi-attacher:v0.4.1
image: quay.io/k8scsi/csi-attacher:v1.0-canary
leakingtapan marked this conversation as resolved.
Show resolved Hide resolved
args:
- --v=5
- --csi-address=$(ADDRESS)
Expand Down
4 changes: 2 additions & 2 deletions deploy/kubernetes/v1.12+/node.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ spec:
securityContext:
privileged: true
imagePullPolicy: Always
image: quay.io/k8scsi/driver-registrar:v0.4.1
image: quay.io/k8scsi/driver-registrar:v1.0-canary
args:
- --v=5
- --csi-address=$(ADDRESS)
Expand Down Expand Up @@ -132,7 +132,7 @@ spec:
type: DirectoryOrCreate
- name: registration-dir
hostPath:
path: /var/lib/kubelet/plugins/
path: /var/lib/kubelet/plugins_registry/
type: Directory
- name: device-dir
hostPath:
Expand Down
2 changes: 1 addition & 1 deletion deploy/kubernetes/v1.12+/provisioner.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ spec:
capabilities:
add: ["SYS_ADMIN"]
allowPrivilegeEscalation: true
image: quay.io/k8scsi/csi-provisioner:v0.4.1
image: quay.io/k8scsi/csi-provisioner:v1.0-canary
args:
- --provisioner=ebs.csi.aws.com
- --csi-address=$(ADDRESS)
Expand Down
36 changes: 10 additions & 26 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,36 +1,20 @@
module github.com/kubernetes-sigs/aws-ebs-csi-driver

require (
github.com/aws/aws-sdk-go v1.15.27
github.com/container-storage-interface/spec v0.3.0
github.com/aws/aws-sdk-go v1.15.81
github.com/container-storage-interface/spec v1.0.0
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/fsnotify/fsnotify v1.4.7 // indirect
github.com/go-ini/ini v1.38.2 // indirect
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b
github.com/golang/mock v1.1.1
github.com/golang/protobuf v1.2.0 // indirect
github.com/gopherjs/gopherjs v0.0.0-20180825215210-0210a2f0f73c // indirect
github.com/hpcloud/tail v1.0.0 // indirect
github.com/jtolds/gls v4.2.1+incompatible // indirect
github.com/kubernetes-csi/csi-test v0.3.0-2
github.com/onsi/ginkgo v1.6.0
github.com/onsi/gomega v1.4.1
github.com/kubernetes-csi/csi-test v1.0.0-rc2
github.com/onsi/ginkgo v1.7.0
github.com/onsi/gomega v1.4.3
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d // indirect
github.com/smartystreets/goconvey v0.0.0-20180222194500-ef6db91d284a // indirect
github.com/spf13/afero v1.1.2 // indirect
github.com/stretchr/testify v1.2.2 // indirect
golang.org/x/net v0.0.0-20180826012351-8a410e7b638d // indirect
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f // indirect
golang.org/x/sys v0.0.0-20180905064716-d9c697bf0b2a // indirect
golang.org/x/text v0.3.0 // indirect
google.golang.org/genproto v0.0.0-20180831171423-11092d34479b // indirect
google.golang.org/grpc v1.14.0
gopkg.in/fsnotify.v1 v1.4.7 // indirect
gopkg.in/ini.v1 v1.38.2 // indirect
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect
gopkg.in/yaml.v2 v2.2.1 // indirect
k8s.io/apimachinery v0.0.0-20180904031649-6429050ef506
k8s.io/kubernetes v1.11.2
k8s.io/utils v0.0.0-20180817171939-982821ea41da // indirect
google.golang.org/grpc v1.16.0
k8s.io/apimachinery v0.0.0-20181121071008-d4f83ca2e260
k8s.io/klog v0.1.0 // indirect
k8s.io/kubernetes v1.12.2
k8s.io/utils v0.0.0-20181115163542-0d26856f57b3 // indirect
)
71 changes: 36 additions & 35 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,69 +1,70 @@
github.com/aws/aws-sdk-go v1.15.27 h1:i75BxN4Es/8rTVQbEKAP1WCiIhhz635xTNeDdZJRAXQ=
github.com/aws/aws-sdk-go v1.15.27/go.mod h1:mFuSZ37Z9YOHbQEwBWztmVzqXrEkub65tZoCYDt7FT0=
github.com/container-storage-interface/spec v0.3.0 h1:ALxSqFjptj8R5rL+cdyAbwbaLHHXDL5pmp1qIh1b+38=
github.com/container-storage-interface/spec v0.3.0/go.mod h1:6URME8mwIBbpVyZV93Ce5St17xBiQJQY67NDsuohiy4=
cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
github.com/aws/aws-sdk-go v1.15.81 h1:va7uoFaV9uKAtZ6BTmp1u7paoMsizYRRLvRuoC07nQ8=
github.com/aws/aws-sdk-go v1.15.81/go.mod h1:E3/ieXAlvM0XWO57iftYVDLLvQ824smPP3ATZkfNZeM=
github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
github.com/container-storage-interface/spec v1.0.0 h1:3DyXuJgf9MU6kyULESegQUmozsSxhpyrrv9u5bfwA3E=
github.com/container-storage-interface/spec v1.0.0/go.mod h1:6URME8mwIBbpVyZV93Ce5St17xBiQJQY67NDsuohiy4=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I=
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
github.com/go-ini/ini v1.25.4/go.mod h1:ByCAeIL28uOIIG0E3PJtZPDL8WnHpFKFOtgjp+3Ies8=
github.com/go-ini/ini v1.38.2 h1:6Hl/z3p3iFkA0dlDfzYxuFuUGD+kaweypF6btsR2/Q4=
github.com/go-ini/ini v1.38.2/go.mod h1:ByCAeIL28uOIIG0E3PJtZPDL8WnHpFKFOtgjp+3Ies8=
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b h1:VKtxabqXZkF25pY9ekfRL6a582T4P37/31XEstQ5p58=
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
github.com/golang/lint v0.0.0-20180702182130-06c8688daad7/go.mod h1:tluoj9z5200jBnyusfRPU2LqT6J+DAorxEvtC7LHB+E=
github.com/golang/mock v1.1.1 h1:G5FRp8JnTd7RQH5kemVNlMeyXQAztQ3mOWV95KxsXH8=
github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM=
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
github.com/gopherjs/gopherjs v0.0.0-20180825215210-0210a2f0f73c h1:16eHWuMGvCjSfgRJKqIzapE78onvvTbdi1rMkU00lZw=
github.com/gopherjs/gopherjs v0.0.0-20180825215210-0210a2f0f73c/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY=
github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI=
github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
github.com/jmespath/go-jmespath v0.0.0-20160202185014-0b12d6b521d8 h1:12VvqtR6Aowv3l/EQUlocDHW2Cp4G9WJVH7uyH8QFJE=
github.com/jmespath/go-jmespath v0.0.0-20160202185014-0b12d6b521d8/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k=
github.com/jtolds/gls v4.2.1+incompatible h1:fSuqC+Gmlu6l/ZYAoZzx2pyucC8Xza35fpRVWLVmUEE=
github.com/jtolds/gls v4.2.1+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU=
github.com/kubernetes-csi/csi-test v0.3.0-2 h1:RsVmFc3AlpjQdyfMKiphvd8igXwOI7lQgWo+kJAh49c=
github.com/kubernetes-csi/csi-test v0.3.0-2/go.mod h1:YxJ4UiuPWIhMBkxUKY5c267DyA0uDZ/MtAimhx/2TA0=
github.com/onsi/ginkgo v1.6.0 h1:Ix8l273rp3QzYgXSR+c8d1fTG7UPgYkOSELPhiY/YGw=
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
github.com/kubernetes-csi/csi-test v1.0.0-rc2 h1:sfFvZ/R0/1Rdcn0KsfBaog/i3+GrzfgnaRGMpN3LafQ=
github.com/kubernetes-csi/csi-test v1.0.0-rc2/go.mod h1:YxJ4UiuPWIhMBkxUKY5c267DyA0uDZ/MtAimhx/2TA0=
github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
github.com/onsi/gomega v1.4.1 h1:PZSj/UFNaVp3KxrzHOcS7oyuWA7LoOY/77yCTEFu21U=
github.com/onsi/gomega v1.4.1/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA=
github.com/onsi/ginkgo v1.7.0 h1:WSHQ+IS43OoUrWtD1/bbclrwK8TTH5hzp+umCiuxHgs=
github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
github.com/onsi/gomega v1.4.3 h1:RE1xgDvH7imwFD45h+u2SgIfERHlS2yNG4DObb5BSKU=
github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d h1:zE9ykElWQ6/NYmHa3jpm/yHnI4xSofP+UP6SpjHcSeM=
github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc=
github.com/smartystreets/goconvey v0.0.0-20180222194500-ef6db91d284a h1:JSvGDIbmil4Ui/dDdFBExb7/cmkNjyX5F97oglmvCDo=
github.com/smartystreets/goconvey v0.0.0-20180222194500-ef6db91d284a/go.mod h1:XDJAKZRPZ1CvBcN2aX5YOUTYGHki24fSF0Iv48Ibg0s=
github.com/spf13/afero v1.1.2 h1:m8/z1t7/fwjysjQRYbP0RD+bUIF/8tJwPdEZsI83ACI=
github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ=
github.com/stretchr/testify v1.2.2 h1:bSDNvY7ZPG5RlJ8otE/7V6gMiyenm9RtJ7IUVIAoJ1w=
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
golang.org/x/net v0.0.0-20180826012351-8a410e7b638d h1:g9qWBGx4puODJTMVyoPrpoxPFgVGd+z1DZwjfRu4d0I=
golang.org/x/lint v0.0.0-20180702182130-06c8688daad7/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd h1:nTDtHvHSdCn1m6ITfMRqtOd/9+7a3s8RBNOZ3eYZzJA=
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f h1:wMNYb4v58l5UBM7MYRLPG6ZhfOqbKu7X5eyFl8ZhKvA=
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sys v0.0.0-20180905064716-d9c697bf0b2a h1:SiGouh6n/oEeZIl+Z3p+DIbT7gAlcpYv096bOuxJr+I=
golang.org/x/sys v0.0.0-20180905064716-d9c697bf0b2a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e h1:o3PsSEY8E4eXWkXrIP9YJALUkVZqzHJT5DOasTyn8Vs=
golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
google.golang.org/genproto v0.0.0-20180831171423-11092d34479b h1:lohp5blsw53GBXtLyLNaTXPXS9pJ1tiTw61ZHUoE9Qw=
google.golang.org/genproto v0.0.0-20180831171423-11092d34479b/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=
google.golang.org/grpc v1.14.0 h1:ArxJuB1NWfPY6r9Gp9gqwplT0Ge7nqv9msgu03lHLmo=
google.golang.org/grpc v1.14.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw=
golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM=
google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8 h1:Nw54tB0rB7hY/N0NQvRW8DG4Yk3Q6T9cu9RcFQDu1tc=
google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=
google.golang.org/grpc v1.16.0 h1:dz5IJGuC2BB7qXR5AyHNwAUBhZscK2xVez7mznh72sY=
google.golang.org/grpc v1.16.0/go.mod h1:0JHn/cJsOMiMfNA9+DeHDlAU7KAAB5GDlYFpa9MZMio=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/fsnotify.v1 v1.4.7 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4=
gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys=
gopkg.in/ini.v1 v1.38.2 h1:dGcbywv4RufeGeiMycPT/plKB5FtmLKLnWKwBiLhUA4=
gopkg.in/ini.v1 v1.38.2/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ=
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw=
gopkg.in/yaml.v2 v2.2.1 h1:mUhvW9EsL+naU5Q3cakzfE91YhliOondGd6ZrsDBHQE=
gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
k8s.io/apimachinery v0.0.0-20180904031649-6429050ef506 h1:PtU5mK2X6SlRZRor7tOixglpu9B/ixMD5lFeSZklFFo=
k8s.io/apimachinery v0.0.0-20180904031649-6429050ef506/go.mod h1:ccL7Eh7zubPUSh9A3USN90/OzHNSVN6zxzde07TDCL0=
k8s.io/kubernetes v1.11.2 h1:2/lmzYbN17Mr23mX/p4ODMm/MBWTeu2Q1Bvsw82YC40=
k8s.io/kubernetes v1.11.2/go.mod h1:ocZa8+6APFNC2tX1DZASIbocyYT5jHzqFVsY5aoB7Jk=
k8s.io/utils v0.0.0-20180817171939-982821ea41da h1:iSRsIrQWeKa5IIqOOpvhnN2E/7iz+v8VingQHJ3lGhI=
k8s.io/utils v0.0.0-20180817171939-982821ea41da/go.mod h1:8k8uAuAQ0rXslZKaEWd0c3oVhZz7sSzSiPnVZayjIX0=
honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
k8s.io/apimachinery v0.0.0-20181121071008-d4f83ca2e260 h1:aWwjpwRiIZglT1lHFRE7PImhvuV1saC+OW34xd8gNr0=
k8s.io/apimachinery v0.0.0-20181121071008-d4f83ca2e260/go.mod h1:ccL7Eh7zubPUSh9A3USN90/OzHNSVN6zxzde07TDCL0=
k8s.io/klog v0.1.0 h1:I5HMfc/DtuVaGR1KPwUrTc476K8NCqNBldC7H4dYEzk=
k8s.io/klog v0.1.0/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk=
k8s.io/kubernetes v1.12.2 h1:J94sY8nziFyzMNhnbD5CiSZTo7yWytir0ia+vJuwYfc=
k8s.io/kubernetes v1.12.2/go.mod h1:ocZa8+6APFNC2tX1DZASIbocyYT5jHzqFVsY5aoB7Jk=
k8s.io/utils v0.0.0-20181115163542-0d26856f57b3 h1:S3/Kq185JnolOEemhmDXXd23l2t4bX5hPQPQPADlF1E=
k8s.io/utils v0.0.0-20181115163542-0d26856f57b3/go.mod h1:8k8uAuAQ0rXslZKaEWd0c3oVhZz7sSzSiPnVZayjIX0=
15 changes: 9 additions & 6 deletions pkg/driver/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
"context"
"strconv"

csi "github.com/container-storage-interface/spec/lib/go/csi/v0"
csi "github.com/container-storage-interface/spec/lib/go/csi"
"github.com/golang/glog"
"github.com/kubernetes-sigs/aws-ebs-csi-driver/pkg/cloud"
"github.com/kubernetes-sigs/aws-ebs-csi-driver/pkg/util"
Expand Down Expand Up @@ -174,7 +174,7 @@ func (d *Driver) ControllerPublishVolume(ctx context.Context, req *csi.Controlle
glog.V(5).Infof("ControllerPublishVolume: volume %s attached to node %s through device %s", volumeID, nodeID, devicePath)

pvInfo := map[string]string{"devicePath": devicePath}
return &csi.ControllerPublishVolumeResponse{PublishInfo: pvInfo}, nil
return &csi.ControllerPublishVolumeResponse{PublishContext: pvInfo}, nil
}

func (d *Driver) ControllerUnpublishVolume(ctx context.Context, req *csi.ControllerUnpublishVolumeRequest) (*csi.ControllerUnpublishVolumeResponse, error) {
Expand Down Expand Up @@ -242,9 +242,12 @@ func (d *Driver) ValidateVolumeCapabilities(ctx context.Context, req *csi.Valida
return nil, status.Errorf(codes.Internal, "Could not get volume with ID %q: %v", volumeID, err)
}

found := d.isValidVolumeCapabilities(volCaps)
var confirmed *csi.ValidateVolumeCapabilitiesResponse_Confirmed
if d.isValidVolumeCapabilities(volCaps) {
confirmed = &csi.ValidateVolumeCapabilitiesResponse_Confirmed{VolumeCapabilities: volCaps}
}
return &csi.ValidateVolumeCapabilitiesResponse{
Supported: found,
Confirmed: confirmed,
}, nil
}

Expand Down Expand Up @@ -303,9 +306,9 @@ func pickAvailabilityZone(requirement *csi.TopologyRequirement) string {
func newCreateVolumeResponse(disk *cloud.Disk) *csi.CreateVolumeResponse {
return &csi.CreateVolumeResponse{
Volume: &csi.Volume{
Id: disk.VolumeID,
VolumeId: disk.VolumeID,
CapacityBytes: util.GiBToBytes(disk.CapacityGiB),
Attributes: map[string]string{
VolumeContext: map[string]string{
"fsType": disk.FsType,
},
AccessibleTopology: []*csi.Topology{
Expand Down
50 changes: 25 additions & 25 deletions pkg/driver/controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
"context"
"testing"

csi "github.com/container-storage-interface/spec/lib/go/csi/v0"
csi "github.com/container-storage-interface/spec/lib/go/csi"
"github.com/kubernetes-sigs/aws-ebs-csi-driver/pkg/cloud"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
Expand Down Expand Up @@ -58,8 +58,8 @@ func TestCreateVolume(t *testing.T) {
},
expVol: &csi.Volume{
CapacityBytes: stdVolSize,
Id: "vol-test",
Attributes: map[string]string{"fsType": ""},
VolumeId: "vol-test",
VolumeContext: map[string]string{"fsType": ""},
},
},
{
Expand Down Expand Up @@ -88,8 +88,8 @@ func TestCreateVolume(t *testing.T) {
},
expVol: &csi.Volume{
CapacityBytes: stdVolSize,
Id: "vol-test",
Attributes: map[string]string{"fsType": ""},
VolumeId: "vol-test",
VolumeContext: map[string]string{"fsType": ""},
},
},
{
Expand Down Expand Up @@ -117,8 +117,8 @@ func TestCreateVolume(t *testing.T) {
},
expVol: &csi.Volume{
CapacityBytes: cloud.DefaultVolumeSize,
Id: "vol-test",
Attributes: map[string]string{"fsType": ""},
VolumeId: "vol-test",
VolumeContext: map[string]string{"fsType": ""},
},
},
{
Expand All @@ -131,8 +131,8 @@ func TestCreateVolume(t *testing.T) {
},
expVol: &csi.Volume{
CapacityBytes: 2147483648, // 1 GiB + 1 byte = 2 GiB
Id: "vol-test",
Attributes: map[string]string{"fsType": ""},
VolumeId: "vol-test",
VolumeContext: map[string]string{"fsType": ""},
},
},
{
Expand All @@ -145,8 +145,8 @@ func TestCreateVolume(t *testing.T) {
},
expVol: &csi.Volume{
CapacityBytes: stdVolSize,
Id: "vol-test",
Attributes: map[string]string{"fsType": defaultFsType},
VolumeId: "vol-test",
VolumeContext: map[string]string{"fsType": defaultFsType},
},
},
{
Expand All @@ -162,8 +162,8 @@ func TestCreateVolume(t *testing.T) {
},
expVol: &csi.Volume{
CapacityBytes: stdVolSize,
Id: "vol-test",
Attributes: map[string]string{"fsType": ""},
VolumeId: "vol-test",
VolumeContext: map[string]string{"fsType": ""},
},
},
{
Expand All @@ -178,8 +178,8 @@ func TestCreateVolume(t *testing.T) {
},
expVol: &csi.Volume{
CapacityBytes: stdVolSize,
Id: "vol-test",
Attributes: map[string]string{"fsType": ""},
VolumeId: "vol-test",
VolumeContext: map[string]string{"fsType": ""},
},
},
{
Expand All @@ -194,8 +194,8 @@ func TestCreateVolume(t *testing.T) {
},
expVol: &csi.Volume{
CapacityBytes: stdVolSize,
Id: "vol-test",
Attributes: map[string]string{"fsType": ""},
VolumeId: "vol-test",
VolumeContext: map[string]string{"fsType": ""},
},
},
{
Expand All @@ -211,8 +211,8 @@ func TestCreateVolume(t *testing.T) {
},
expVol: &csi.Volume{
CapacityBytes: stdVolSize,
Id: "vol-test",
Attributes: map[string]string{"fsType": ""},
VolumeId: "vol-test",
VolumeContext: map[string]string{"fsType": ""},
},
},
}
Expand Down Expand Up @@ -261,14 +261,14 @@ func TestCreateVolume(t *testing.T) {
t.Fatalf("Expected volume capacity bytes: %v, got: %v", tc.expVol.GetCapacityBytes(), vol.GetCapacityBytes())
}

for expKey, expVal := range tc.expVol.GetAttributes() {
attrs := vol.GetAttributes()
if gotVal, ok := attrs[expKey]; !ok || gotVal != expVal {
t.Fatalf("Expected volume attribute for key %v: %v, got: %v", expKey, expVal, gotVal)
for expKey, expVal := range tc.expVol.GetVolumeContext() {
ctx := vol.GetVolumeContext()
if gotVal, ok := ctx[expKey]; !ok || gotVal != expVal {
t.Fatalf("Expected volume context for key %v: %v, got: %v", expKey, expVal, gotVal)
}
}
if tc.expVol.GetAttributes() == nil && vol.GetAttributes() != nil {
t.Fatalf("Expected volume attributes to be nil, got: %#v", vol.GetAttributes())
if tc.expVol.GetVolumeContext() == nil && vol.GetVolumeContext() != nil {
t.Fatalf("Expected volume context to be nil, got: %#v", vol.GetVolumeContext())
}
}
}
Expand Down
Loading