Skip to content

Commit

Permalink
Merge pull request #35 from sbezverk/csi_0.2.0_breaking_changes
Browse files Browse the repository at this point in the history
CSI 0.2.0 breaking changes
  • Loading branch information
childsb authored Feb 12, 2018
2 parents f73f852 + 7de4bf9 commit 20f0239
Show file tree
Hide file tree
Showing 6,918 changed files with 529,649 additions and 348,016 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
94 changes: 44 additions & 50 deletions Gopkg.lock

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

6 changes: 3 additions & 3 deletions Gopkg.toml
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,12 @@

[[constraint]]
name = "k8s.io/apimachinery"
branch = "release-1.8"
branch = "release-1.9"

[[constraint]]
name = "k8s.io/client-go"
branch = "master"
version = "v6.0.0"

[[constraint]]
name = "k8s.io/api"
branch = "master"
branch = "release-1.9"
14 changes: 1 addition & 13 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,7 @@
# limitations under the License.

IMAGE = k8scsi/csi-provisioner

VERSION :=
TAG := $(shell git describe --abbrev=0 --tags HEAD 2>/dev/null)
COMMIT := $(shell git rev-parse HEAD)
ifeq ($(TAG),)
VERSION := latest
else
ifeq ($(COMMIT), $(shell git rev-list -n1 $(TAG)))
VERSION := $(TAG)
else
VERSION := $(TAG)-$(COMMIT)
endif
endif
VERSION = v0.2.0

container: build quick-container
.PHONY: container
Expand Down
16 changes: 8 additions & 8 deletions pkg/controller/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ var _ controller.Provisioner = &csiProvisioner{}
var (
csiVersion = csi.Version{
Major: 0,
Minor: 1,
Minor: 2,
Patch: 0,
}
accessMode = &csi.VolumeCapability_AccessMode{
Expand Down Expand Up @@ -219,8 +219,8 @@ func (p *csiProvisioner) Provision(options controller.VolumeOptions) (*v1.Persis
},
},
CapacityRange: &csi.CapacityRange{
RequiredBytes: uint64(volSizeBytes),
LimitBytes: uint64(volSizeBytes),
RequiredBytes: int64(volSizeBytes),
LimitBytes: int64(volSizeBytes),
},
}
ctx, cancel := context.WithTimeout(context.Background(), p.timeout)
Expand All @@ -230,14 +230,14 @@ func (p *csiProvisioner) Provision(options controller.VolumeOptions) (*v1.Persis
if err != nil {
return nil, err
}
if rep.VolumeInfo != nil {
glog.V(3).Infof("create volume rep: %+v", *rep.VolumeInfo)
if rep.Volume != nil {
glog.V(3).Infof("create volume rep: %+v", *rep.Volume)
}

annotations := map[string]string{provisionerIDAnn: p.identity}
attributesString, err := json.Marshal(rep.VolumeInfo.Attributes)
attributesString, err := json.Marshal(rep.Volume.Attributes)
if err != nil {
glog.V(2).Infof("fail parsing volume attributes: %+v", rep.VolumeInfo.Attributes)
glog.V(2).Infof("fail parsing volume attributes: %+v", rep.Volume.Attributes)
} else {
annotations[volumeAttributesAnnotation] = string(attributesString)
}
Expand All @@ -256,7 +256,7 @@ func (p *csiProvisioner) Provision(options controller.VolumeOptions) (*v1.Persis
PersistentVolumeSource: v1.PersistentVolumeSource{
CSI: &v1.CSIPersistentVolumeSource{
Driver: p.driverName,
VolumeHandle: p.volumeIdToHandle(rep.VolumeInfo.Id),
VolumeHandle: p.volumeIdToHandle(rep.Volume.Id),
},
},
},
Expand Down

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

Loading

0 comments on commit 20f0239

Please sign in to comment.