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

Prebuilt workload suport #1358

Merged
merged 17 commits into from
Dec 18, 2023
Merged

Conversation

trasc
Copy link
Contributor

@trasc trasc commented Nov 22, 2023

What type of PR is this?

/kind feature

What this PR does / why we need it:

Add the possibility for a job to take the ownership of an existing workload instead of creating it's own.

The target workload is specified in the kueue.x-k8s.io/prebuilt-workload-name label of the job.

If the workload is not present , the job will stay suspended.
If the workload exists but is not equivalent with the job, it will be marked as Finished with failure and the job will remain suspended.

Which issue(s) this PR fixes:

Relates to #693

Special notes for your reviewer:

For batch/job, the pod-template gets a set of lables derived from the job name and object UID, these labels should not be modified by RunWithPodSetsInfo or RestorePodSetsInfo. This is covered in the current PR.

Other job types might have different special behavior to take into account, that is why we limit the usage of the feature to batch/job for now. We should extend the list of supported job types as needed during the job type integration with multikueue.

Does this PR introduce a user-facing change?

Add prebuilt workload support for batch/job.

@k8s-ci-robot k8s-ci-robot added 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. labels Nov 22, 2023
Copy link

netlify bot commented Nov 22, 2023

Deploy Preview for kubernetes-sigs-kueue canceled.

Name Link
🔨 Latest commit 6bb596b
🔍 Latest deploy log https://app.netlify.com/sites/kubernetes-sigs-kueue/deploys/658016a68a39720008aa55c1

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Nov 22, 2023
@k8s-ci-robot k8s-ci-robot added the size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. label Nov 22, 2023
@alculquicondor
Copy link
Contributor

/assign @mwielgus

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Nov 25, 2023
@k8s-ci-robot k8s-ci-robot added needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. and removed needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Nov 27, 2023
@k8s-ci-robot k8s-ci-robot added needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. and removed needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Nov 28, 2023
@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 4, 2023
Copy link
Contributor

@mimowo mimowo left a comment

Choose a reason for hiding this comment

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

The new label is part of API, and as such its name should be discussed in a KEP, can we have it mentioned in the MultiKueue KEP #1380? cc @mwielgus

pkg/controller/jobframework/reconciler.go Outdated Show resolved Hide resolved
pkg/controller/jobframework/reconciler.go Outdated Show resolved Hide resolved
pkg/controller/jobframework/reconciler.go Outdated Show resolved Hide resolved
pkg/controller/jobframework/reconciler.go Show resolved Hide resolved
pkg/controller/jobframework/validation.go Outdated Show resolved Hide resolved
pkg/controller/jobframework/reconciler.go Outdated Show resolved Hide resolved
pkg/controller/jobs/job/job_controller.go Outdated Show resolved Hide resolved
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Dec 15, 2023
@trasc
Copy link
Contributor Author

trasc commented Dec 15, 2023

/unhold
@mimowo

@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 Dec 15, 2023
@mimowo
Copy link
Contributor

mimowo commented Dec 15, 2023

/lgtm

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

LGTM label has been added.

Git tree hash: 4424a785f8e5370c93a75082120e0b1b879438c6

@tenzen-y
Copy link
Member

ACK

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.

What if I want to delete a Workload before a Job had a chance to use it?
Would the Workload be finalized? Or is that something that will be solved with #1454 ?

pkg/controller/jobframework/interface.go Outdated Show resolved Hide resolved
pkg/controller/jobframework/reconciler.go Show resolved Hide resolved
pkg/controller/jobframework/reconciler.go Show resolved Hide resolved
test/e2e/singlecluster/e2e_test.go Show resolved Hide resolved
test/e2e/singlecluster/e2e_test.go Show resolved Hide resolved
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Dec 18, 2023
@trasc
Copy link
Contributor Author

trasc commented Dec 18, 2023

What if I want to delete a Workload before a Job had a chance to use it?
Would the Workload be finalized? Or is that something that will be solved with #1454 ?

This should be manage by the mechanism that creates the wl.

(overall having the wl finalizer set only for the duration ta ability to restore the podset info wold have made this easier)

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

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

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

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 Dec 18, 2023
@alculquicondor
Copy link
Contributor

/lgtm

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

LGTM label has been added.

Git tree hash: 151eb975a07171c0cdd6c9ae3750051015550022

@k8s-ci-robot k8s-ci-robot merged commit bb69906 into kubernetes-sigs:main Dec 18, 2023
14 checks passed
@k8s-ci-robot k8s-ci-robot added this to the v0.6 milestone Dec 18, 2023
@trasc trasc deleted the prebuilt-workload branch December 19, 2023 07:05
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/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/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.

None yet

6 participants