Skip to content

Commit

Permalink
docs: Consistent example in k8s-jobs.yaml (#11185)
Browse files Browse the repository at this point in the history
Signed-off-by: Yuan Tang <[email protected]>
  • Loading branch information
terrytangyuan authored Jun 20, 2023
1 parent ac9161c commit 9229989
Showing 1 changed file with 13 additions and 11 deletions.
24 changes: 13 additions & 11 deletions examples/k8s-jobs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
generateName: k8s-jobs-
name: k8s-jobs
spec:
entrypoint: pi-tmpl
entrypoint: rand-num
templates:
- name: pi-tmpl
- name: rand-num
resource:
action: create
# successCondition and failureCondition are optional expressions which are
Expand All @@ -21,24 +21,26 @@ spec:
# (not just labels). Multiple AND conditions can be represented by comma
# delimited expressions. For more details, see:
# https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/
successCondition: status.succeeded > 0
failureCondition: status.failed > 3
successCondition: status.succeeded > 2
failureCondition: status.failed > 1
setOwnerReference: true
manifest: |
apiVersion: batch/v1
kind: Job
metadata:
generateName: pi-job-
generateName: rand-num-
spec:
completions: 3
parallelism: 3
template:
metadata:
name: pi
name: rand
spec:
containers:
- name: pi
image: perl
command: ["perl", "-Mbignum=bpi", "-wle", "print bpi(2000)"]
- name: rand
image: python:alpine3.6
command: ["python", "-c", "import random; import time; print(random.randint(1, 1000)); time.sleep(10)"]
restartPolicy: Never
backoffLimit: 4
# Resource templates can have output parameters extracted from fields of the
# resource. Two techniques are provided: jsonpath and a jq filter.
outputs:
Expand Down

0 comments on commit 9229989

Please sign in to comment.