36 lines
1.0 KiB
YAML
36 lines
1.0 KiB
YAML
apiVersion: batch/v1
|
|
kind: CronJob
|
|
metadata:
|
|
name: royalroad-chapters-update-rr
|
|
spec:
|
|
schedule: "5-59/10 * * * *"
|
|
concurrencyPolicy: Forbid
|
|
successfulJobsHistoryLimit: 1
|
|
failedJobsHistoryLimit: 1
|
|
jobTemplate:
|
|
spec:
|
|
backoffLimit: 0
|
|
template:
|
|
spec:
|
|
restartPolicy: Never
|
|
containers:
|
|
- name: curl
|
|
image: curlimages/curl
|
|
command: ["/bin/sh", "-c"]
|
|
args:
|
|
- >
|
|
curl -fsS --max-time 120 -X POST
|
|
-H "Authorization: Bearer $(cat /etc/secrets/scheduler_key)"
|
|
http://service-royalroad-chapters-internal:5000/royalroad
|
|
volumeMounts:
|
|
- name: key
|
|
mountPath: /etc/secrets
|
|
readOnly: true
|
|
volumes:
|
|
- name: key
|
|
secret:
|
|
secretName: service-royalroad-chapters
|
|
items:
|
|
- key: scheduler_key
|
|
path: scheduler_key
|