make a cron job

This commit is contained in:
Waylon Walker 2024-02-12 09:12:41 -06:00
parent e89a039949
commit 9437bb1ab3
No known key found for this signature in database
GPG key ID: 66E2BF2B4190EFE4

22
active/cronjob.yaml Normal file
View 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