27 lines
694 B
YAML
27 lines
694 B
YAML
apiVersion: batch/v1
|
|
kind: CronJob
|
|
metadata:
|
|
name: timestamp-cronjob
|
|
spec:
|
|
schedule: "*/1 * * * *"
|
|
jobTemplate:
|
|
spec:
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: timestamp-job
|
|
spec:
|
|
containers:
|
|
- name: timestamp-container
|
|
image: busybox
|
|
command: ["sh", "-c", "date >> /logs/runs.log"]
|
|
volumeMounts:
|
|
- name: logs-volume
|
|
mountPath: /logs
|
|
subPath: logs
|
|
restartPolicy: OnFailure
|
|
volumes:
|
|
- name: logs-volume
|
|
persistentVolumeClaim:
|
|
claimName: data
|
|
subPath: logs
|