minecraft-servers/active/weather_report.yaml
2024-02-13 19:49:50 -06:00

27 lines
720 B
YAML

apiVersion: batch/v1
kind: CronJob
metadata:
name: weather-cronjob
spec:
schedule: "*/1 * * * *"
jobTemplate:
spec:
template:
metadata:
labels:
app: weather-job
spec:
containers:
- name: weather-container
image: busybox
command: ["sh", "-c", "curl 'wttr.in/peoria,il?format=3' >> /logs/weather.log"]
volumeMounts:
- name: logs-volume
mountPath: /logs
subPath: logs
restartPolicy: OnFailure
volumes:
- name: logs-volume
persistentVolumeClaim:
claimName: data
subPath: logs