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

[workload] Add maximum execution time. #3184

Merged

Conversation

trasc
Copy link
Contributor

@trasc trasc commented Oct 3, 2024

What type of PR is this?

/kind feature

What this PR does / why we need it:

Add maximum execution time support for workloads.

A new optional field is added spec.maximumExecutionTimeSeconds which can specify the maximum time (in second) it is allowed to be admitted. Once this time is exceeded, the workload is automatically deactivated.

Which issue(s) this PR fixes:

Related to #3125

Special notes for your reviewer:

This is part 1 out of 3 in the implementation of #3133, the jobs integration and admission time accumulation are implemented in the next two PRs.

Does this PR introduce a user-facing change?

NONE

@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 release-note Denotes a PR that will be considered when it comes time to generate release notes. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. kind/feature Categorizes issue or PR as related to a new feature. labels Oct 3, 2024
@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Oct 3, 2024
@trasc
Copy link
Contributor Author

trasc commented Oct 3, 2024

/test all

@k8s-ci-robot k8s-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Oct 3, 2024
Copy link

netlify bot commented Oct 3, 2024

Deploy Preview for kubernetes-sigs-kueue canceled.

Name Link
🔨 Latest commit dc4b77a
🔍 Latest deploy log https://app.netlify.com/sites/kubernetes-sigs-kueue/deploys/671a0e9fd7a8a60008532d17

@trasc trasc force-pushed the max-exec-time-workload-deactivate branch from c3b99a3 to aee16f2 Compare October 3, 2024 11:01
@trasc
Copy link
Contributor Author

trasc commented Oct 3, 2024

/test all

1 similar comment
@trasc
Copy link
Contributor Author

trasc commented Oct 4, 2024

/test all

@trasc trasc force-pushed the max-exec-time-workload-deactivate branch from f60d1cc to ab6e7ee Compare October 23, 2024 13:28
@trasc
Copy link
Contributor Author

trasc commented Oct 23, 2024

/test all

@trasc trasc changed the title [workload]Add max execution time [workload] Add maximum execution time. Oct 23, 2024
@trasc trasc marked this pull request as ready for review October 23, 2024 13:47
@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 Oct 23, 2024
@trasc
Copy link
Contributor Author

trasc commented Oct 23, 2024

/cc @tenzen-y

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.

Mostly, lgtm

pkg/controller/core/workload_controller.go Outdated Show resolved Hide resolved
pkg/controller/core/workload_controller.go Outdated Show resolved Hide resolved
apis/kueue/v1beta1/workload_types.go Outdated Show resolved Hide resolved
test/integration/webhook/core/workload_test.go Outdated Show resolved Hide resolved
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.

Thank you!
/lgtm
/approve

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

LGTM label has been added.

Git tree hash: c59fa3127a27f351d4a8c55cfd4449561b927f35

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: tenzen-y, 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 Oct 24, 2024
@k8s-ci-robot k8s-ci-robot merged commit cdbb7a1 into kubernetes-sigs:main Oct 24, 2024
16 checks passed
@k8s-ci-robot k8s-ci-robot added this to the v0.9 milestone Oct 24, 2024
@trasc trasc deleted the max-exec-time-workload-deactivate branch October 24, 2024 14:25
@tenzen-y
Copy link
Member

All MaximumExecutionTime release notes should be consolidated into one PR the same as other features.

/release-note-edit

NONE

@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. and removed release-note Denotes a PR that will be considered when it comes time to generate release notes. labels Oct 28, 2024
@mimowo
Copy link
Contributor

mimowo commented Oct 28, 2024

/release-note-none
As the note is consolidated into #3191

PBundyra pushed a commit to PBundyra/kueue that referenced this pull request Nov 5, 2024
* [api][workload] Add `MaximumExecutionTime`

* [api][workload] Add `MaximumExecutionTime` - generate

* [controller][workload] Enforce `MaximumExecutionTime`

* [webhook][workload] Validate `MaximumExecutionTime`

* [workload] Don't deactivate twice

* Realign with KEP

* Review Remarks

* Review remarks
kannon92 pushed a commit to openshift-kannon92/kubernetes-sigs-kueue that referenced this pull request Nov 19, 2024
* [api][workload] Add `MaximumExecutionTime`

* [api][workload] Add `MaximumExecutionTime` - generate

* [controller][workload] Enforce `MaximumExecutionTime`

* [webhook][workload] Validate `MaximumExecutionTime`

* [workload] Don't deactivate twice

* Realign with KEP

* Review Remarks

* Review remarks
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-none Denotes a PR that doesn't merit a release note. 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.

4 participants