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

Mutable pod scheduling directives #116161

Merged

Conversation

danielvegamyhre
Copy link
Member

@danielvegamyhre danielvegamyhre commented Feb 28, 2023

What type of PR is this?

/kind feature
/sig scheduling

Optionally add one or more of the following kinds if applicable:
/kind api-change

What this PR does / why we need it:

See KEP for context.

Which issue(s) this PR fixes:

Fixes #116160

Special notes for your reviewer:

Does this PR introduce a user-facing change?

Relax API validation to allow pod node selector to be mutable for gated pods (additions only, no deletions or mutations).

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

[KEP](https://github.com/kubernetes/enhancements/tree/master/keps/sig-scheduling/3838-pod-mutable-scheduling-directives)

@k8s-ci-robot k8s-ci-robot added kind/feature Categorizes issue or PR as related to a new feature. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. sig/scheduling Categorizes an issue or PR as relevant to SIG Scheduling. kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. labels Feb 28, 2023
@danielvegamyhre danielvegamyhre changed the title Mutable pod scheduling directives Mutable pod scheduling directives [NOT READY FOR REVIEW] Feb 28, 2023
@danielvegamyhre danielvegamyhre changed the title Mutable pod scheduling directives [NOT READY FOR REVIEW] Mutable pod scheduling directives [IN PROGRESS - NOT READY FOR REVIEW] Feb 28, 2023
@k8s-ci-robot k8s-ci-robot added the sig/apps Categorizes an issue or PR as relevant to SIG Apps. label Feb 28, 2023
@k8s-triage-robot
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 size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Mar 1, 2023
@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. 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 Mar 1, 2023
Copy link
Member

@ahg-g ahg-g left a comment

Choose a reason for hiding this comment

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

This is in the right track; please note that we need to do this for nodeAffinity too.

pkg/apis/core/validation/validation.go Outdated Show resolved Hide resolved
pkg/apis/core/validation/validation_test.go Show resolved Hide resolved
@k8s-ci-robot k8s-ci-robot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Mar 1, 2023
pkg/apis/core/validation/validation.go Outdated Show resolved Hide resolved
pkg/apis/core/validation/validation.go Outdated Show resolved Hide resolved
pkg/apis/core/validation/validation.go Outdated Show resolved Hide resolved
pkg/apis/core/validation/validation_test.go Show resolved Hide resolved
pkg/apis/core/validation/validation_test.go Show resolved Hide resolved
@danielvegamyhre
Copy link
Member Author

@ahg-g Thanks for the review, I have addressed your comments and this is ready for another look. I will also start working on integration tests.

@danielvegamyhre danielvegamyhre changed the title Mutable pod scheduling directives [IN PROGRESS - NOT READY FOR REVIEW] Mutable pod scheduling directives [IN PROGRESS] Mar 2, 2023
Copy link
Member

@ahg-g ahg-g left a comment

Choose a reason for hiding this comment

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

Thanks, lets add integration tests.

pkg/apis/core/validation/validation.go Outdated Show resolved Hide resolved
@ahg-g
Copy link
Member

ahg-g commented Mar 2, 2023

/label api-review

@liggitt this is ready

@danielvegamyhre
Copy link
Member Author

/retest

pkg/apis/core/validation/validation.go Outdated Show resolved Hide resolved
pkg/apis/core/validation/validation.go Outdated Show resolved Hide resolved
pkg/apis/core/validation/validation.go Outdated Show resolved Hide resolved
@liggitt
Copy link
Member

liggitt commented Mar 9, 2023

(integration flake was fixed by #116393)

@danielvegamyhre
Copy link
Member Author

/retest

@liggitt liggitt moved this from Changes requested to In progress in API Reviews Mar 10, 2023
@liggitt
Copy link
Member

liggitt commented Mar 10, 2023

/lgtm
/approve
Thanks for all the iterations, the test coverage on this is really good

/hold
Squash down to a single commit and fixup the commit message, then @ahg-g can re-lgtm

@k8s-ci-robot k8s-ci-robot added do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. lgtm "Looks good to me", indicates that a PR is ready to be merged. labels Mar 10, 2023
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: a6aaf0d572d6d665b45d787039bab092862d4a84

@liggitt liggitt moved this from In progress to API review completed, 1.27 in API Reviews Mar 10, 2023
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: danielvegamyhre, liggitt

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 Mar 10, 2023
@liggitt
Copy link
Member

liggitt commented Mar 10, 2023

/triage accepted
/priority important-soon

@k8s-ci-robot k8s-ci-robot added triage/accepted Indicates an issue or PR is ready to be actively worked on. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. and removed needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. labels Mar 10, 2023
@ahg-g
Copy link
Member

ahg-g commented Mar 10, 2023

Thanks @liggitt for the detailed review!

@ahg-g
Copy link
Member

ahg-g commented Mar 10, 2023

/lgtm
/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 Mar 10, 2023
@danielvegamyhre
Copy link
Member Author

Squashed commits and updated the commit message

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api-review Categorizes an issue or PR as actively needing an API review. approved Indicates a PR has been approved by an approver from all required OWNERS files. area/test 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/apps Categorizes an issue or PR as relevant to SIG Apps. sig/scheduling Categorizes an issue or PR as relevant to SIG Scheduling. sig/testing Categorizes an issue or PR as relevant to SIG Testing. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. triage/accepted Indicates an issue or PR is ready to be actively worked on.
Projects
Status: API review completed, 1.27
Archived in project
Development

Successfully merging this pull request may close these issues.

Mutable pod scheduling directives
6 participants