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 LabelSelector to PersistentVolumeClaimSpec #25917

Merged
merged 3 commits into from
May 31, 2016

Conversation

pmorie
Copy link
Member

@pmorie pmorie commented May 19, 2016

Implements #25413.

@kubernetes/sig-storage @bgrant0607 @thockin @jsafrane @eparis

@pmorie pmorie added area/api Indicates an issue on api area. sig/storage Categorizes an issue or PR as relevant to SIG Storage. kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API labels May 19, 2016
@pmorie pmorie added this to the v1.3 milestone May 19, 2016
@pmorie pmorie changed the title Pv selector Add LabelSelector to PersistentVolumeClaimSpec May 19, 2016
@pmorie pmorie added the release-note Denotes a PR that will be considered when it comes time to generate release notes. label May 19, 2016
@k8s-github-robot k8s-github-robot added the size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. label May 19, 2016
@bgrant0607 bgrant0607 assigned thockin and unassigned lavalamp May 19, 2016
@@ -360,6 +360,8 @@ type PersistentVolumeClaimList struct {
type PersistentVolumeClaimSpec struct {
// Contains the types of access modes required
AccessModes []PersistentVolumeAccessMode `json:"accessModes,omitempty"`
// PersistentVolumeSelector is a selector which must be true for the claim to bind to a volume
LabelSelector *unversioned.LabelSelector `json:"labelSelector,omitempty"`
Copy link
Member

Choose a reason for hiding this comment

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

I'd just call it selector.

Copy link
Member Author

Choose a reason for hiding this comment

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

ack

@k8s-github-robot k8s-github-robot added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. and removed size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels May 20, 2016
@jsafrane
Copy link
Member

@k8s-bot test this issue: #IGNORE

// selector, if specified
if volume.Spec.ClaimRef == nil {
if claim.Spec.LabelSelector != nil {
internalSelector, err := unversioned.LabelSelectorAsSelector(claim.Spec.LabelSelector)
Copy link
Member

Choose a reason for hiding this comment

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

I'd create the internalSelector only once, outside the loop and then reuse it for matching.

Copy link
Member Author

Choose a reason for hiding this comment

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

fixed locally

@pmorie
Copy link
Member Author

pmorie commented May 20, 2016

@jsafrane feedback addressed, PTAL

@jsafrane
Copy link
Member

nicely done, LGTM

@jsafrane jsafrane added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 21, 2016
@k8s-github-robot k8s-github-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label May 21, 2016
@pmorie pmorie assigned jsafrane and unassigned thockin May 23, 2016
@pmorie pmorie removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 23, 2016
@eparis eparis added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 23, 2016
@k8s-github-robot k8s-github-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label May 26, 2016
@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 May 27, 2016
@pmorie pmorie added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 27, 2016
@pmorie
Copy link
Member Author

pmorie commented May 27, 2016

Test failures are actually my bad. Fixing.

@k8s-github-robot k8s-github-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 27, 2016
@pmorie pmorie added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 27, 2016
@k8s-github-robot k8s-github-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label May 28, 2016
@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 May 28, 2016
@pmorie pmorie added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 28, 2016
@k8s-github-robot k8s-github-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label May 30, 2016
@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 May 31, 2016
@pmorie pmorie added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 31, 2016
@k8s-github-robot
Copy link

@k8s-bot test this [submit-queue is verifying that this PR is safe to merge]

@k8s-bot
Copy link

k8s-bot commented May 31, 2016

GCE e2e build/test passed for commit acfcb73.

@k8s-github-robot
Copy link

Automatic merge from submit-queue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/api Indicates an issue on api area. 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 Denotes a PR that will be considered when it comes time to generate release notes. 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.

10 participants