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

Allow stoping admission from a specific LocalQueue. #2173

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mbobrovskyi
Copy link
Contributor

What type of PR is this?

/kind feature

What this PR does / why we need it:

To allow stoping admission from a specific LocalQueue.

Which issue(s) this PR fixes:

Fixes #2109

Special notes for your reviewer:

Does this PR introduce a user-facing change?

Allow stoping admission from a specific LocalQueue.

@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. release-note Denotes a PR that will be considered when it comes time to generate release notes. kind/feature Categorizes issue or PR as related to a new feature. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels May 9, 2024
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: mbobrovskyi
Once this PR has been reviewed and has the lgtm label, please assign alculquicondor for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found 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 size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label May 9, 2024
Copy link

netlify bot commented May 9, 2024

Deploy Preview for kubernetes-sigs-kueue canceled.

Name Link
🔨 Latest commit 378daa9
🔍 Latest deploy log https://app.netlify.com/sites/kubernetes-sigs-kueue/deploys/6644ab571cb9bf00082c946f

@mbobrovskyi
Copy link
Contributor Author

/assign

@k8s-ci-robot k8s-ci-robot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels May 9, 2024
@mbobrovskyi mbobrovskyi force-pushed the feature/allow-stoping-admission-from-a-specific-localqueue branch 5 times, most recently from 0c028a8 to 8532514 Compare May 13, 2024 15:10
@mbobrovskyi
Copy link
Contributor Author

/ok-to-test

@k8s-ci-robot k8s-ci-robot added the ok-to-test Indicates a non-member PR verified by an org member that is safe to test. label May 13, 2024
@mbobrovskyi mbobrovskyi force-pushed the feature/allow-stoping-admission-from-a-specific-localqueue branch from fc9a019 to ad65c6f Compare May 13, 2024 15:23
@mbobrovskyi
Copy link
Contributor Author

/assign @trasc

apis/kueue/v1beta1/stop_policy.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
pkg/controller/jobframework/reconciler.go Outdated Show resolved Hide resolved
@mbobrovskyi mbobrovskyi force-pushed the feature/allow-stoping-admission-from-a-specific-localqueue branch from ad65c6f to 6efdcff Compare May 14, 2024 10:13
@mbobrovskyi mbobrovskyi marked this pull request as ready for review May 14, 2024 10:14
@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 May 14, 2024
@mbobrovskyi mbobrovskyi force-pushed the feature/allow-stoping-admission-from-a-specific-localqueue branch from 6efdcff to 900d6b7 Compare May 14, 2024 14:51
Copy link
Contributor

@trasc trasc left a comment

Choose a reason for hiding this comment

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

A couple more comments. otherwise LGTM overall

pkg/controller/core/localqueue_controller.go Outdated Show resolved Hide resolved
pkg/controller/core/localqueue_controller.go Outdated Show resolved Hide resolved
pkg/controller/core/localqueue_controller.go Show resolved Hide resolved
pkg/controller/core/workload_controller.go Outdated Show resolved Hide resolved
@mbobrovskyi mbobrovskyi force-pushed the feature/allow-stoping-admission-from-a-specific-localqueue branch from 900d6b7 to 378daa9 Compare May 15, 2024 12:32
@trasc
Copy link
Contributor

trasc commented May 15, 2024

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 15, 2024
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: a53233261ab10920026cf68fe39460dbfe419ccd

@mbobrovskyi
Copy link
Contributor Author

/cc @mwielgus
/cc @alculquicondor

@mbobrovskyi
Copy link
Contributor Author

/assign @alculquicondor

}

r.queues.DeleteLocalQueue(oldLq)
r.cache.DeleteLocalQueue(oldLq)
Copy link
Contributor

Choose a reason for hiding this comment

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

Doesn't this immediately release the quota for all the workloads in this localqueue? Even if stopPolicy == Hold?

} else {
queue.Status.PendingWorkloads = 0
queue.Status.ReservingWorkloads = 0
queue.Status.AdmittedWorkloads = 0
Copy link
Contributor

Choose a reason for hiding this comment

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

This is not accurate. If the policy is just Hold, we still need to track what is still running.

@alculquicondor
Copy link
Contributor

/hold

Let's not merge this until we have released 0.7

Please work on other commands for now.

@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 May 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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/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. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. release-note Denotes a PR that will be considered when it comes time to generate release notes. 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.

Allow stoping admission from a specific LocalQueue
5 participants