make a cron job
This commit is contained in:
parent
e89a039949
commit
9437bb1ab3
1 changed files with 22 additions and 0 deletions
22
active/cronjob.yaml
Normal file
22
active/cronjob.yaml
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
apiVersion: batch/v1
|
||||
kind: Job
|
||||
metadata:
|
||||
name: timestamp-job
|
||||
spec:
|
||||
template:
|
||||
metadata:
|
||||
name: timestamp-job
|
||||
spec:
|
||||
containers:
|
||||
- name: timestamp-container
|
||||
image: busybox
|
||||
command: ["sh", "-c", "while true; do date >> /logs/runs.log; sleep 60; done"]
|
||||
volumeMounts:
|
||||
- name: logs-volume
|
||||
mountPath: /logs
|
||||
subPath: logs
|
||||
restartPolicy: Never
|
||||
volumes:
|
||||
- name: data
|
||||
persistentVolumeClaim:
|
||||
claimName: data
|
||||
Loading…
Add table
Add a link
Reference in a new issue