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

Node affinity and NodeSelector design doc #18261

Merged
merged 1 commit into from Jan 24, 2016

Conversation

davidopp
Copy link
Member

@davidopp davidopp commented Dec 6, 2015

@k8s-github-robot
Copy link

Labelling this PR as size/L

@k8s-github-robot k8s-github-robot added kind/design Categorizes issue or PR as related to design. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Dec 6, 2015
@k8s-bot
Copy link

k8s-bot commented Dec 6, 2015

GCE e2e test build/test passed for commit 974392ea8b82b4f0c0772877a886caf948701663.

@k8s-bot
Copy link

k8s-bot commented Dec 7, 2015

GCE e2e build/test failed for commit 0f952fd863d82c9bfccb1562e347b45f452e4fd0.

@k8s-bot
Copy link

k8s-bot commented Dec 7, 2015

GCE e2e build/test failed for commit d1bf70e40d5592deb626cc7172210a3359ed7850.

@davidopp davidopp changed the title NodeSelector, NodeConstraints, NodePreferences proposal initial draft. NodeSelector, NodeConstraints, NodePreferences proposal Dec 7, 2015
@k8s-bot
Copy link

k8s-bot commented Dec 7, 2015

GCE e2e build/test failed for commit 84ec093b8ba7a7c1f8f316b7d401382b48892f98.

@davidopp
Copy link
Member Author

davidopp commented Dec 7, 2015

@quinton-hoole this is relevant to both flavors of Ubernetes

## Introduction

This document proposes a new label selector representation, called `NodeSelector`,
that is similar in many ways to `PodSelector`, but is a bit more flexible and is
Copy link
Contributor

Choose a reason for hiding this comment

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

s/PodSelector/LabelSelector/

@bgrant0607 bgrant0607 mentioned this pull request Dec 8, 2015
@davidopp
Copy link
Member Author

davidopp commented Dec 8, 2015

Comments from meeting with @bgrant0607 today follow. I will update the proposal to reflect them shortly:

  • Make it clear that Kubelet should enforce constraints (not just scheduler); goes into shared predicate library between kubelet and scheduler
  • Should tell users not to use these features until they have been in Kubelet and master for enough binary versions that we feel comfortable we will not need to roll back either to a version that does not support them; longer-term would be good to have a way to enforce this (Cluster versioning #4855)

// A node selector represents the union of the results of one or more label queries
// over a set of nodes; that is, it represents the OR of the selectors represented
// by the nodeSelectorTerms.
// TODO: what are the semantics of empty and null?
Copy link
Contributor

Choose a reason for hiding this comment

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

I'd suggest sticking to what we have with generalized selectors, iow. empty - selects every object in the collection; null - selects no objects.

@bgrant0607 bgrant0607 added lgtm "Looks good to me", indicates that a PR is ready to be merged. e2e-not-required labels Jan 22, 2016
@k8s-github-robot
Copy link

PR changed after LGTM, removing LGTM.

@k8s-github-robot k8s-github-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jan 24, 2016
@davidopp davidopp added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jan 24, 2016
@k8s-github-robot
Copy link

PR changed after LGTM, removing LGTM.

@k8s-github-robot k8s-github-robot removed lgtm "Looks good to me", indicates that a PR is ready to be merged. kind/design Categorizes issue or PR as related to design. labels Jan 24, 2016
@k8s-bot
Copy link

k8s-bot commented Jan 24, 2016

GCE e2e test build/test passed for commit a5dee8655f28f6fb74e9f7f9bcec1774cd9c6397.

@k8s-bot
Copy link

k8s-bot commented Jan 24, 2016

GCE e2e test build/test passed for commit d306ee88f064ffa7204faab6e030273ec04956dc.

@k8s-bot
Copy link

k8s-bot commented Jan 24, 2016

GCE e2e test build/test passed for commit f09d1c7405d4939f7dda67452d11561817ba882b.

@davidopp davidopp added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jan 24, 2016
@davidopp davidopp changed the title NodeSelector, NodeConstraints, NodePreferences proposal Node affinity and NodeSelector design doc Jan 24, 2016
@k8s-github-robot
Copy link

PR changed after LGTM, removing LGTM.

@k8s-github-robot k8s-github-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jan 24, 2016
@davidopp davidopp added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jan 24, 2016
@k8s-bot
Copy link

k8s-bot commented Jan 24, 2016

GCE e2e test build/test passed for commit 32fa440.

@davidopp
Copy link
Member Author

Tests pass, manually merging as this is a doc-only PR with just one doc.

davidopp pushed a commit that referenced this pull request Jan 24, 2016
Node affinity and NodeSelector design doc
@davidopp davidopp merged commit 1948dc5 into kubernetes:master Jan 24, 2016
k8s-github-robot pushed a commit that referenced this pull request Jul 6, 2016
Automatic merge from submit-queue

selector: make sure value of GT and LT is integer

GT and LT in selector has been introduced in Node Affinity feature: #19758, #18261

According to the API:

>  If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer.

But the implementation has parsed it as float64:
https://github.com/kubernetes/kubernetes/blob/ef0c9f0c5b8efbba948a0be2c98d9d2e32e0b68c/pkg/labels/selector.go#L183

Modeling integer as float is dangerous. We don't even have fixed precision guarantee when doing comparison.

This PR is to get rid of this pre-optimization and convert **integer** to int64.
@davidopp davidopp mentioned this pull request Oct 1, 2016
23 tasks
openshift-publish-robot pushed a commit to openshift/kubernetes that referenced this pull request Feb 27, 2018
Automatic merge from submit-queue (batch tested with PRs 18415, 18419, 18268, 18102, 18440).

UPSTREAM: 58753: Fix kubectl explain for cronjobs

Fixes kubernetes#18261.

@Kargakis fyi
/assign @juanvallejo

Origin-commit: 797fbdec73a8959129a95be7bfdb0e3d53d18d45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.

None yet