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

Add VolumeBindingMode to StorageClass API #54436

Merged
merged 3 commits into from
Nov 15, 2017

Conversation

msau42
Copy link
Member

@msau42 msau42 commented Oct 23, 2017

What this PR does / why we need it:
Adds a new field VolumeBindingMode to StorageClass, as specified in kubernetes/community#1168

Which issue this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close that issue when PR gets merged): fixes #54434

Special notes for your reviewer:
API changes only. The scheduler and PV controller work will be submitted as a separate PR.

Release note:
NONE

@kubernetes/sig-storage-pr-reviews

@k8s-ci-robot
Copy link
Contributor

@msau42: Adding do-not-merge/release-note-label-needed because the release note process has not been followed.

One of the following labels is required "release-note", "release-note-action-required", or "release-note-none".
Please see: https://github.com/kubernetes/community/blob/master/contributors/devel/pull-requests.md#write-release-notes-if-needed.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@k8s-ci-robot k8s-ci-robot added sig/storage Categorizes an issue or PR as relevant to SIG Storage. do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Oct 23, 2017
@msau42
Copy link
Member Author

msau42 commented Oct 23, 2017

/assign @thockin @jsafrane

@msau42
Copy link
Member Author

msau42 commented Oct 23, 2017

/release-note-none

@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. and removed do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. labels Oct 23, 2017
@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 Oct 23, 2017
@msau42
Copy link
Member Author

msau42 commented Oct 23, 2017

/test pull-kubernetes-unit

@msau42 msau42 force-pushed the sc-api branch 3 times, most recently from 423a762 to 7350af6 Compare October 24, 2017 15:52
@k8s-github-robot k8s-github-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Oct 29, 2017
}

// NoProvisioner is a special Provisioner value to use when a StorageClass
// is required but there is no dynamic provisioner.
const NoProvisioner = "k8s.io/no-provisioner"
Copy link
Member

Choose a reason for hiding this comment

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

Should be kubernetes.io/no-provisioner - we don't generally use k8s.io in formal names (except API versions, but that one got away from me).

// be provisioned and bound until a Pod is created that references the
// PeristentVolumeClaim. The volume provisioning and binding will occur during
// Pod scheduing.
VolumeBindingTopologyAware VolumeBindingMode = "TopologyAware"
Copy link
Member

Choose a reason for hiding this comment

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

As a constant, this doesn't really explain what it will do. What's wrong with "FirstConsumer" or something ?

Copy link
Member Author

Choose a reason for hiding this comment

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

"FirstPod"? "WaitForPod"?

Copy link
Member Author

Choose a reason for hiding this comment

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

How about "WaitForFirstConsumer"? I like how the "wait" contrasts with "immediate"

@thockin
Copy link
Member

thockin commented Oct 30, 2017 via email

@thockin
Copy link
Member

thockin commented Oct 31, 2017 via email

@k8s-github-robot k8s-github-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Nov 1, 2017
@msau42
Copy link
Member Author

msau42 commented Nov 1, 2017

/test pull-kubernetes-e2e-gce

@msau42
Copy link
Member Author

msau42 commented Nov 1, 2017

/test pull-kubernetes-unit

@msau42
Copy link
Member Author

msau42 commented Nov 1, 2017

Updated

}

// NoProvisioner is a special Provisioner value to use when a StorageClass
// is required but there is no dynamic provisioner.
const NoProvisioner = "kubernetes.io/no-provisioner"
Copy link
Member

Choose a reason for hiding this comment

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

Why do we need this, as opposed to ""

also, this seems unrelated to this PR?

Copy link
Member Author

Choose a reason for hiding this comment

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

Validation requires that the provisioner string is non-empty. Also, when we add dynamic provisioning support in the future, we will need a way to distinguish between a StorageClass that only supports static provisioning (with some fake provisioner name) vs dynamic provisioners. But you're right, we don't need it right now. I can add it in a future PR when it will actually get used.

// alpha: v1.9
//
// Extend the default scheduler to be aware of PV topology and handle PV binding
VolumeTopologyBinding utilfeature.Feature = "VolumeTopologyBinding"
Copy link
Member

Choose a reason for hiding this comment

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

This name feels awkward - it doesn't really capture what it is doing?

Copy link
Member Author

Choose a reason for hiding this comment

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

Hmmm the end goal is to allow the scheduler to make pv binding decisions. How about, VolumeScheduling? Or VolumeBindingInScheduler?

@thockin
Copy link
Member

thockin commented Nov 14, 2017

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Nov 14, 2017
@k8s-github-robot k8s-github-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Nov 14, 2017
@k8s-github-robot k8s-github-robot removed lgtm "Looks good to me", indicates that a PR is ready to be merged. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Nov 14, 2017
@msau42
Copy link
Member Author

msau42 commented Nov 14, 2017

/test pull-kubernetes-unit

@msau42
Copy link
Member Author

msau42 commented Nov 14, 2017

Had to rebase, didn't change anything

@msau42
Copy link
Member Author

msau42 commented Nov 14, 2017

/test pull-kubernetes-e2e-gce

@msau42
Copy link
Member Author

msau42 commented Nov 14, 2017

/test pull-kubernetes-bazel-test

@msau42
Copy link
Member Author

msau42 commented Nov 14, 2017

This is ready to go @thockin

@thockin thockin added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Nov 15, 2017
@k8s-github-robot k8s-github-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Nov 15, 2017
@k8s-github-robot k8s-github-robot removed lgtm "Looks good to me", indicates that a PR is ready to be merged. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Nov 15, 2017
@thockin
Copy link
Member

thockin commented Nov 15, 2017

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Nov 15, 2017
@k8s-github-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

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

Associated issue: 1168

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

Needs approval from an approver in each of these OWNERS Files:

You can indicate your approval by writing /approve in a comment
You can cancel your approval by writing /approve cancel in a comment

@k8s-github-robot
Copy link

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

@k8s-ci-robot
Copy link
Contributor

k8s-ci-robot commented Nov 15, 2017

@msau42: The following test failed, say /retest to rerun them all:

Test name Commit Details Rerun command
pull-kubernetes-unit 207d13f link /test pull-kubernetes-unit

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@k8s-github-robot
Copy link

Automatic merge from submit-queue (batch tested with PRs 54436, 53148, 55153, 55614, 55484). If you want to cherry-pick this change to another branch, please follow the instructions here.

@k8s-github-robot k8s-github-robot merged commit 5c59d66 into kubernetes:master Nov 15, 2017
@msau42 msau42 deleted the sc-api branch February 9, 2018 01:33
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 lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note-none Denotes a PR that doesn't merit a release note. sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. 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.

Volume topology aware scheduling API changes
6 participants