Created
February 6, 2023 22:56
-
-
Save jleach/77bf54c86cc8bcc792a4fef3022d1462 to your computer and use it in GitHub Desktop.
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
--- | |
apiVersion: batch/v1 | |
kind: Job | |
metadata: | |
name: pi | |
spec: | |
parallelism: 1 | |
completions: 1 | |
activeDeadlineSeconds: 1800 | |
backoffLimit: 6 | |
template: | |
metadata: | |
name: pi | |
spec: | |
containers: | |
- name: pi | |
image: perl | |
command: ["perl", "-Mbignum=bpi", "-wle", "print bpi(2000)"] | |
restartPolicy: OnFailure | |
--- | |
apiVersion: batch/v1 | |
kind: CronJob | |
metadata: | |
name: pi | |
spec: | |
schedule: "*/3 * * * *" | |
concurrencyPolicy: "Replace" | |
startingDeadlineSeconds: 200 | |
suspend: true | |
successfulJobsHistoryLimit: 3 | |
failedJobsHistoryLimit: 1 | |
jobTemplate: | |
spec: | |
template: | |
metadata: | |
labels: | |
parent: "cronjobpi" | |
spec: | |
containers: | |
- name: pi | |
image: perl | |
command: ["perl", "-Mbignum=bpi", "-wle", "print bpi(2000)"] | |
restartPolicy: OnFailure |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment