Skip to content

Commit

Permalink
[doc] Maximum execution time (#3308)
Browse files Browse the repository at this point in the history
* [doc] Maximum execution time

* Review Remarks
  • Loading branch information
trasc authored Nov 4, 2024
1 parent c125207 commit a67f2b1
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
17 changes: 17 additions & 0 deletions site/content/en/docs/concepts/workload.md
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,23 @@ the requeueState (`.status.requeueState`) will be reset to null.
You can configure Kueue to copy labels, at Workload creation, into the new Workload from the underlying Job or Pod objects. This can be useful for Workload identification and debugging.
You can specify which labels should be copied by setting the `labelKeysToCopy` field in the configuration API (under `integrations`). By default, Kueue does not copy any Job or Pod label into the Workload.

## Maximum execution time

You can configure a Workload's maximum execution time by specifying the expected maximum number of seconds for it to run in:

```yaml
spec:
maximumExecutionTimeSeconds: n
```

If the workload spends more then `n` seconds in `Admitted` state, including the time spent as `Admitted` in previous "Admit/Evict" cycles, it gets automatically deactivated.
Once deactivated, the accumulated time spent as active in previous "Admit/Evict" cycles is set to 0.

If `maximumExecutionTimeSeconds` is not specified, the workload has no execution time limit.

You can configure the `maximumExecutionTimeSeconds` of the Workload associated with any supported Kueue Job by specifying the desired value as `kueue.x-k8s.io/max-exec-time-seconds` label of the job.



## What's next

Expand Down
11 changes: 11 additions & 0 deletions site/content/en/docs/reference/labels-and-annotations.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,17 @@ Used on: [Plain Pods](/docs/tasks/run/plain_pods/).
The label key that indicates which pods are managed by Kueuue.


### kueue.x-k8s.io/max-exec-time-seconds

Type: Label

Example: `kueue.x-k8s.io/max-exec-time-seconds: "120"`

Used on: Kueue-managed Jobs.

The value of this label is passed in the Job's Workload `spec.maximumExecutionTimeSeconds` and used by the [Maximum execution time](/docs/concepts/workload/#maximum-execution-time) feature.


### kueue.x-k8s.io/multikueue-origin

Type: Label
Expand Down

0 comments on commit a67f2b1

Please sign in to comment.