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

A mechanism to stop a ClusterQueue #1299

Merged
merged 10 commits into from
Dec 6, 2023
Merged

Conversation

trasc
Copy link
Contributor

@trasc trasc commented Oct 30, 2023

What type of PR is this?

/kind feature

What this PR does / why we need it:

Added a setting in a ClusterQueue stopPolicy, for an administrator to pause new admissions and/or stop all running jobs.

Why is this needed:

Which issue(s) this PR fixes:

Fixes #1284

Special notes for your reviewer:

Does this PR introduce a user-facing change?

A `stopPolicy` field in the ClusterQueue allows to hold or drain a ClusterQueue

@k8s-ci-robot
Copy link
Contributor

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@k8s-ci-robot k8s-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. 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 30, 2023
@netlify
Copy link

netlify bot commented Oct 30, 2023

Deploy Preview for kubernetes-sigs-kueue ready!

Name Link
🔨 Latest commit 1d9d21e
🔍 Latest deploy log https://app.netlify.com/sites/kubernetes-sigs-kueue/deploys/657012d21ec47e00081a4a7d
😎 Deploy Preview https://deploy-preview-1299--kubernetes-sigs-kueue.netlify.app/docs/concepts/cluster_queue
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Oct 30, 2023
@k8s-ci-robot k8s-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Oct 30, 2023
@trasc trasc mentioned this pull request Oct 30, 2023
3 tasks
@trasc
Copy link
Contributor Author

trasc commented Nov 6, 2023

/cc @yaroslava-serdiuk

@k8s-ci-robot
Copy link
Contributor

@trasc: GitHub didn't allow me to request PR reviews from the following users: yaroslava-serdiuk.

Note that only kubernetes-sigs members and repo collaborators can review this PR, and authors cannot review their own PRs.

In response to this:

/cc @yaroslava-serdiuk

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.

@stuton
Copy link
Contributor

stuton commented Nov 23, 2023

/retitle A mechanism to stop a ClusterQueue

@k8s-ci-robot k8s-ci-robot changed the title WIP Stop cq A mechanism to stop a ClusterQueue Nov 23, 2023
@stuton
Copy link
Contributor

stuton commented Nov 23, 2023

/release-note-edit Added a mechanism to stop a ClusterQueue.

@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 Nov 24, 2023
@trasc trasc marked this pull request as ready for review November 24, 2023 11:27
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Nov 24, 2023
@stuton stuton force-pushed the stop-cq branch 2 times, most recently from dccdbf6 to 282edf4 Compare November 24, 2023 13:14
@alculquicondor
Copy link
Contributor

Please update based on the KEP

@alculquicondor
Copy link
Contributor

/assign @yaroslava-serdiuk
for reviews

@yaroslava-serdiuk
Copy link
Contributor

I'll review when tests are fixed

@stuton stuton force-pushed the stop-cq branch 3 times, most recently from 5425b8d to b9f7d02 Compare November 30, 2023 15:48
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Dec 1, 2023
Copy link
Contributor

@yaroslava-serdiuk yaroslava-serdiuk left a comment

Choose a reason for hiding this comment

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

Thanks for the change! Left few comments

pkg/cache/clusterqueue.go Outdated Show resolved Hide resolved
pkg/queue/manager_test.go Outdated Show resolved Hide resolved
pkg/controller/core/workload_controller.go Outdated Show resolved Hide resolved
pkg/controller/core/workload_controller.go Outdated Show resolved Hide resolved
Copy link
Contributor

@alculquicondor alculquicondor left a comment

Choose a reason for hiding this comment

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

/approve
I'll leave LGTM to @yaroslava-serdiuk

apis/kueue/v1beta1/clusterqueue_types.go Outdated Show resolved Hide resolved
apis/kueue/v1beta1/workload_types.go Outdated Show resolved Hide resolved
pkg/cache/clusterqueue.go Outdated Show resolved Hide resolved
pkg/util/testing/wrappers.go Outdated Show resolved Hide resolved
@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Dec 5, 2023
Copy link
Member

@tenzen-y tenzen-y left a comment

Choose a reason for hiding this comment

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

Totaly LGTM
I left comments for some nits.

apis/kueue/v1beta1/workload_types.go Outdated Show resolved Hide resolved
site/content/en/docs/concepts/cluster_queue.md Outdated Show resolved Hide resolved
pkg/queue/manager_test.go Outdated Show resolved Hide resolved
test/integration/scheduler/scheduler_test.go Outdated Show resolved Hide resolved
test/integration/scheduler/scheduler_test.go Outdated Show resolved Hide resolved
Copy link
Contributor

@yaroslava-serdiuk yaroslava-serdiuk left a comment

Choose a reason for hiding this comment

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

/lgtm

pkg/queue/manager.go Show resolved Hide resolved
@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Dec 6, 2023
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: d26a520d427dc784205402ed64bf5ec15124c947

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: alculquicondor, trasc, yaroslava-serdiuk

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

@yaroslava-serdiuk
Copy link
Contributor

/hold
maybe squash commits?

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Dec 6, 2023
@k8s-ci-robot k8s-ci-robot merged commit 4d7f990 into kubernetes-sigs:main Dec 6, 2023
14 checks passed
@k8s-ci-robot k8s-ci-robot added this to the v0.6 milestone Dec 6, 2023
@yaroslava-serdiuk
Copy link
Contributor

/unhold too late :)

@trasc trasc deleted the stop-cq branch December 14, 2023 11:17
@JayFrank
Copy link

Could the title be misleading? Maybe "A mechanism to pause or stop a ClusterQueue" would be better?

@alculquicondor
Copy link
Contributor

/release-note-edit

A `stopPolicy` field in the ClusterQueue allows to hold or drain a ClusterQueue

@alculquicondor
Copy link
Contributor

/kind feature

@k8s-ci-robot k8s-ci-robot added the kind/feature Categorizes issue or PR as related to a new feature. label Jan 23, 2024
@tenzen-y
Copy link
Member

/kind api-change

@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 Feb 12, 2024
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. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. 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. release-note Denotes a PR that will be considered when it comes time to generate release notes. 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.

A mechanism to stop a ClusterQueue
7 participants