-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add ability to timeout a container/script using activeDeadlineSeconds
- Loading branch information
Showing
3 changed files
with
23 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# To enforce a timeout to a template, specify a value for activeDeadlineSeconds. | ||
# This value represents the duration in seconds relative to the pod StartTime | ||
# that the pod may be active on a node before the system actively tries to | ||
# terminate it. This field is only applicable to container and script templates. | ||
apiVersion: argoproj.io/v1alpha1 | ||
kind: Workflow | ||
metadata: | ||
generateName: timeouts- | ||
spec: | ||
entrypoint: sleep | ||
templates: | ||
- name: sleep | ||
container: | ||
image: alpine:latest | ||
command: [sh, -c] | ||
args: ["echo sleeping for 1m; sleep 60; echo done"] | ||
activeDeadlineSeconds: 10 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters