weather nohelm
This commit is contained in:
parent
87ad20d355
commit
6d5aa8d441
1 changed files with 27 additions and 0 deletions
27
active/weather_report.yaml
Normal file
27
active/weather_report.yaml
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
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
|
||||
Loading…
Add table
Add a link
Reference in a new issue