Skip to content

Commit

Permalink
[doc] Maximum execution time
Browse files Browse the repository at this point in the history
  • Loading branch information
trasc committed Oct 24, 2024
1 parent 1ca7bf1 commit 41f2ab7
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 @@ -180,3 +180,14 @@ Example: `kueue.x-k8s.io/role-hash: "b54683bb"`
Used on: [Plain Pods](/docs/tasks/run/plain_pods/).

The annotation key is used as the name for a Workload podSet.


### 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.

0 comments on commit 41f2ab7

Please sign in to comment.