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

Implement topology awareness support for dynamic provisioning #42

Merged
merged 3 commits into from
Oct 10, 2018

Conversation

leakingtapan
Copy link
Contributor

Changes includes:

  1. return topology in NodeGetInfo response eg. accessible_topology =
    {"com.amazon.aws.csi.ebs/zone": "us-west-2a"}
  2. consumes topology requirement in CreateVolume request and creates
    volume using the given zone while favoring preferred topologies
  3. pick a random zone when topology requirement is not provided
    (this is the case of dynamic provisioning without delayed binding)
  4. Add unit test for pickAvailabilityZone()
  5. Add test case for CreateDisk with zone

Fixes: #17

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Oct 4, 2018
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: leakingtapan

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Oct 4, 2018
@coveralls
Copy link

coveralls commented Oct 4, 2018

Pull Request Test Coverage Report for Build 29

  • 67 of 80 (83.75%) changed or added relevant lines in 3 files are covered.
  • 3 unchanged lines in 1 file lost coverage.
  • Overall coverage increased (+1.8%) to 48.926%

Changes Missing Coverage Covered Lines Changed/Added Lines %
pkg/driver/controller.go 39 41 95.12%
pkg/cloud/cloud.go 28 32 87.5%
pkg/driver/node.go 0 7 0.0%
Files with Coverage Reduction New Missed Lines %
pkg/cloud/cloud.go 3 68.2%
Totals Coverage Status
Change from base Build 26: 1.8%
Covered Lines: 501
Relevant Lines: 1024

💛 - Coveralls

@leakingtapan
Copy link
Contributor Author

Build will be fixed by #43

@leakingtapan leakingtapan force-pushed the topology branch 2 times, most recently from 4fe248f to 04a7c34 Compare October 6, 2018 15:33
Copy link
Member

@bertinatto bertinatto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a few minor observations, but in general it LGTM. Needs a rebase, though.

We also need an e2e test for this functionality. It can be implemented in another PR, though. Here's an example from GCP: https://github.com/kubernetes-sigs/gcp-compute-persistent-disk-csi-driver/blob/master/test/e2e/tests/multi_zone_e2e_test.go

pkg/cloud/cloud.go Outdated Show resolved Hide resolved
pkg/cloud/cloud.go Show resolved Hide resolved
pkg/cloud/cloud_test.go Outdated Show resolved Hide resolved
pkg/cloud/cloud.go Show resolved Hide resolved
pkg/cloud/cloud.go Show resolved Hide resolved
@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Oct 8, 2018
@bertinatto bertinatto removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Oct 8, 2018
@leakingtapan leakingtapan force-pushed the topology branch 2 times, most recently from 463336e to a20fb44 Compare October 10, 2018 04:59
Cheng Pan added 3 commits October 9, 2018 22:04
Changes includes:
1. return topology in NodeGetInfo response eg. accessible_topology =
{"com.amazon.aws.csi.ebs/zone": "us-west-2a"}
2. consumes topology requirement in CreateVolume request and creates
volume using the given zone while favoring preferred topologies
3. pick a random zone when topology requirement is not provided
(this is the case of dynamic provisioning without delayed binding)
4. Add unit test for pickAvailabilityZone()
5. Add test case for CreateDisk with zone
populate context for `DescribeAvailabilityZonesWithContext`
@leakingtapan
Copy link
Contributor Author

Addressed the comments and also rebased

@bertinatto
Copy link
Member

/lgtm

This is awesome, thank you for implementing this.

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Oct 10, 2018
@k8s-ci-robot k8s-ci-robot merged commit fa25e65 into kubernetes-sigs:master Oct 10, 2018
@leakingtapan leakingtapan deleted the topology branch October 15, 2018 21:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants