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

Runtimeclass scheduling api #80825

Merged
merged 2 commits into from
Aug 13, 2019

Conversation

tallclair
Copy link
Member

What type of PR is this?
/kind api-change

What this PR does / why we need it:

This is a roll-forward of #78598, which was reverted since the implementation of the API didn't make the 1.15 cutoff.

Which issue(s) this PR fixes:
For #72413

Special notes for your reviewer:

Changes from the original PR:

  • Merge changes with Overhead API, a few stylistic changes for consistency.
  • Split generated code into a separate commit.
  • Add +listType=map and associated keys, to pass new API verification. listtype & keys should match those on the PodSpec tolerations, but the tags are missing on that field (legacy exception).
  • Add validation for the uniqueness of tolerations, to match the listType.

Does this PR introduce a user-facing change?:

Add scheduling support for RuntimeClasses. RuntimeClasses can now specify nodeSelector constraints & tolerations, which are merged into the PodSpec for pods using that RuntimeClass.

Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:

- [KEP]: https://github.com/kubernetes/enhancements/blob/master/keps/sig-node/runtime-class-scheduling.md

/sig node
/priority important-soon
/milestone v1.16

/assign @yastij @thockin
/cc @egernst

@k8s-ci-robot k8s-ci-robot added the release-note Denotes a PR that will be considered when it comes time to generate release notes. label Jul 31, 2019
@k8s-ci-robot k8s-ci-robot added the kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API label Jul 31, 2019
@k8s-ci-robot k8s-ci-robot added this to the v1.16 milestone Jul 31, 2019
@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. sig/node Categorizes an issue or PR as relevant to SIG Node. labels Jul 31, 2019
@k8s-ci-robot k8s-ci-robot added priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Jul 31, 2019
@tallclair tallclair force-pushed the runtimeclass-scheduling-api branch from a12e9bc to d388a00 Compare July 31, 2019 20:58
@fejta-bot
Copy link

This PR may require API review.

If so, when the changes are ready, complete the pre-review checklist and request an API review.

Status of requested reviews is tracked in the API Review project.

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Aug 2, 2019
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Aug 6, 2019
@tallclair
Copy link
Member Author

/retest

Scheduling: &v1alpha1.Scheduling{
NodeSelector: map[string]string{"extra-soft": "true"},
Tolerations: []corev1.Toleration{{
Key: "stinky",
Copy link
Contributor

Choose a reason for hiding this comment

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

nice key.

Copy link
Member

@thockin thockin left a comment

Choose a reason for hiding this comment

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

/approve

API approved, couple of quick questions

pkg/apis/node/v1alpha1/conversion.go Show resolved Hide resolved
staging/src/k8s.io/api/node/v1beta1/types.go Outdated Show resolved Hide resolved
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: tallclair, 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

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 6, 2019
@thockin thockin added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Aug 7, 2019
@thockin
Copy link
Member

thockin commented Aug 7, 2019

/lgtm
/hold

I'll LGTM - you decide about the patchability and remove the hold, or fix it and ping me.

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Aug 7, 2019
Copy link
Member

@yastij yastij left a comment

Choose a reason for hiding this comment

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

/lgtm

yastij and others added 2 commits August 9, 2019 11:13
Co-authored-by: Tim Allclair <tallclair@google.com>
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Aug 9, 2019
@k8s-ci-robot
Copy link
Contributor

New changes are detected. LGTM label has been removed.

@thockin
Copy link
Member

thockin commented Aug 9, 2019

Did we make a decision about patchability? The LGTM is yours.

@apelisse
Copy link
Member

apelisse commented Aug 9, 2019

AFAIK, there is no patching for multiple keys. The multiple key thing is only for apply. Also (and we need to improve on this), keys should be required, and here they are all optional. Replacing the "short" list of tolerations is fine with a JSONPatch.

@thockin
Copy link
Member

thockin commented Aug 10, 2019

That's what I thought you'd say. Great point about keys needing to not be optional

@draveness
Copy link
Contributor

/retest

@draveness
Copy link
Contributor

Hi @tallclair, is this PR ready for merge or need more discussions?

@tallclair
Copy link
Member Author

This is ready to merge, just waiting on an LGTM from @thockin or @apelisse

@apelisse
Copy link
Member

Haven't looked much at the code, but I'm fine with the listType.

@tallclair
Copy link
Member Author

/hold cancel

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Aug 12, 2019
@tallclair
Copy link
Member Author

self-lgtm per @thockin & @apelisse comments

@tallclair tallclair added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Aug 12, 2019
@k8s-ci-robot k8s-ci-robot merged commit 2f91fcc into kubernetes:master Aug 13, 2019
@ProgramerGu
Copy link

Do NodeAffinity plan to gradually took over from NodeSelecter?

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. 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/node Categorizes an issue or PR as relevant to SIG Node. 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

9 participants