Created
April 20, 2022 16:16
-
-
Save gengwg/e9046baca15bce79c182d3a35eeb92ad to your computer and use it in GitHub Desktop.
This file contains hidden or 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: CronJob | |
metadata: | |
name: example | |
spec: | |
concurrencyPolicy: Forbid | |
failedJobsHistoryLimit: 1 | |
jobTemplate: | |
spec: | |
activeDeadlineSeconds: 600 | |
backoffLimit: 3 | |
template: | |
spec: | |
containers: | |
- image: busybox:1.31.1 | |
command: | |
- sleep | |
- "10" # increase to 100 to test successful | |
imagePullPolicy: Always | |
name: mycontainer | |
dnsPolicy: ClusterFirst | |
restartPolicy: OnFailure | |
ttlSecondsAfterFinished: 180 | |
schedule: '*/1 * * * *' | |
successfulJobsHistoryLimit: 3 | |
suspend: false |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment