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

API change for volume topology aware dynamic provisioning #63233

Merged
merged 2 commits into from
Jun 5, 2018
Merged

API change for volume topology aware dynamic provisioning #63233

merged 2 commits into from
Jun 5, 2018

Conversation

lichuqiang
Copy link
Contributor

@lichuqiang lichuqiang commented Apr 27, 2018

What this PR does / why we need it:

Split PR #63193 for better review
part 2: API change

Previous: #63232
Next: #63193

Which issue(s) this PR fixes
Feature: kubernetes/enhancements#561
Design: kubernetes/community#2168

Special notes for your reviewer:
/sig storage
/sig scheduling
/assign @msau42 @jsafrane @thockin

Release note:

API change for volume topology aware dynamic provisioning

@k8s-ci-robot k8s-ci-robot added sig/storage Categorizes an issue or PR as relevant to SIG Storage. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. sig/scheduling Categorizes an issue or PR as relevant to SIG Scheduling. release-note Denotes a PR that will be considered when it comes time to generate release notes. labels Apr 27, 2018
@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Apr 27, 2018
@k8s-github-robot k8s-github-robot added the kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API label Apr 27, 2018
@@ -27,4 +27,10 @@ func DropDisabledAlphaFields(class *storage.StorageClass) {
if !utilfeature.DefaultFeatureGate.Enabled(features.VolumeScheduling) {
class.VolumeBindingMode = nil
}
if !utilfeature.DefaultFeatureGate.Enabled(features.DynamicProvisioningScheduling) {
if class.Status != nil {
Copy link
Member

Choose a reason for hiding this comment

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

why are we not setting class.Status to nil?

if class.AllowedTopologies != nil {
t.Errorf("AllowedTopology field didn't get dropped: %+v", class.AllowedTopologies)
}
if class.Status.Capacity != nil {
Copy link
Member

Choose a reason for hiding this comment

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

Shouldn't we check if class.Status is nil?

}

func printCapacityInStorageClass(w PrefixWriter, capacity *storage.StorageClassCapacity) {
w.Write(LEVEL_0, "Capacity:\t")
Copy link
Member

Choose a reason for hiding this comment

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

Is this the best practice? Capacity: <none> even when capacity is nil? (asking since this is just a alpha feature, it should not even show up if it is not set right?)

newClass.AllowVolumeExpansion = oldClass.AllowVolumeExpansion
newClass.VolumeBindingMode = oldClass.VolumeBindingMode
newClass.AllowedTopologies = oldClass.AllowedTopologies

Copy link
Member

Choose a reason for hiding this comment

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

We don't set Status right?

@msau42
Copy link
Member

msau42 commented Apr 27, 2018

@lichuqiang can you add WIP to the title since the api design is still being discussed?

@lichuqiang lichuqiang changed the title API change for volume topology aware dynamic provisioning WIP: API change for volume topology aware dynamic provisioning Apr 28, 2018
@k8s-ci-robot k8s-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Apr 28, 2018
@lichuqiang
Copy link
Contributor Author

Sorry, it's my fault. @dims, as @msau42 implied, the API design is still under discussion, really appreciate if you can move to kubernetes/community#1857 for API design discussion together :)

@dims
Copy link
Member

dims commented Apr 28, 2018

no worries. i just had some free time :)

@k8s-ci-robot k8s-ci-robot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels May 17, 2018
@lichuqiang
Copy link
Contributor Author

Updated according to latest update in proposal.
Remove the capacity reporting for now, and will implement the part in individual PRs

@k8s-ci-robot k8s-ci-robot added needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. and removed needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Jun 2, 2018
@msau42
Copy link
Member

msau42 commented Jun 4, 2018

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jun 4, 2018
@lichuqiang
Copy link
Contributor Author

@thockin Can you take a look at the change?

// Restrict the node topologies where volumes can be dynamically provisioned.
// Each volume plugin defines its own supported topology specifications.
// This field is alpha-level and is only honored by servers that enable
// the DynamicProvisioningScheduling feature.
Copy link
Member

Choose a reason for hiding this comment

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

Document default behavior if empty

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

@thockin
Copy link
Member

thockin commented Jun 4, 2018

API LGTM. Small comment change requested. Will approve now, please fix before or after merge

@thockin
Copy link
Member

thockin commented Jun 4, 2018

/approve

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 4, 2018
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jun 5, 2018
@lichuqiang
Copy link
Contributor Author

@thockin @msau42 Can you help add milestone and related labels to get it merged?

@msau42
Copy link
Member

msau42 commented Jun 5, 2018

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jun 5, 2018
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: lichuqiang, msau42, thockin

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

@msau42
Copy link
Member

msau42 commented Jun 5, 2018

/priority important-soon

@k8s-ci-robot k8s-ci-robot added the priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. label Jun 5, 2018
@msau42
Copy link
Member

msau42 commented Jun 5, 2018

/kind feature

@k8s-ci-robot k8s-ci-robot added the kind/feature Categorizes issue or PR as related to a new feature. label Jun 5, 2018
@k8s-github-robot
Copy link

[MILESTONENOTIFIER] Milestone Pull Request: Up-to-date for process

@jsafrane @lichuqiang @msau42 @thockin

Pull Request Labels
  • sig/scheduling sig/storage: Pull Request will be escalated to these SIGs if needed.
  • priority/important-soon: Escalate to the pull request owners and SIG owner; move out of milestone after several unsuccessful escalation attempts.
  • kind/feature: New functionality.
Help

@k8s-github-robot
Copy link

/test all [submit-queue is verifying that this PR is safe to merge]

@k8s-github-robot
Copy link

Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions here.

@k8s-github-robot k8s-github-robot merged commit 77d996b into kubernetes:master Jun 5, 2018
dims pushed a commit to dims/kubernetes that referenced this pull request Jun 5, 2018
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Volume topology aware dynamic provisioning: work based on new API

**What this PR does / why we need it**:

The PR has been split to 3 parts:

Part1: kubernetes#63232 for basic scheduler and PV controller plumbing
Part2: kubernetes#63233 for API change

and the PR itself includes work based on the API change:

- Dynamic provisioning allowed topologies scheduler work
- Update provisioning interface to be aware of selected node and topology

**Which issue(s) this PR fixes** 
Feature: kubernetes/enhancements#561
Design: kubernetes/community#2168

**Special notes for your reviewer**:
/sig storage
/sig scheduling
/assign @msau42 @jsafrane @saad-ali @bsalamat

@kubernetes/sig-storage-pr-reviews
@kubernetes/sig-scheduling-pr-reviews

**Release note**:

```release-note
Volume topology aware dynamic provisioning
```
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. kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API kind/feature Categorizes issue or PR as related to a new feature. lgtm "Looks good to me", indicates that a PR is ready to be merged. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. release-note Denotes a PR that will be considered when it comes time to generate release notes. sig/scheduling Categorizes an issue or PR as relevant to SIG Scheduling. sig/storage Categorizes an issue or PR as relevant to SIG Storage. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants