Initial commit: Essential Oil Formula Cost Calculator
This commit is contained in:
30
deploy/cronjob.yaml
Normal file
30
deploy/cronjob.yaml
Normal file
@@ -0,0 +1,30 @@
|
||||
apiVersion: batch/v1
|
||||
kind: CronJob
|
||||
metadata:
|
||||
name: weekly-review
|
||||
namespace: oil-calculator
|
||||
spec:
|
||||
schedule: "0 9 * * 1" # Every Monday 9:00 UTC (17:00 China time)
|
||||
jobTemplate:
|
||||
spec:
|
||||
template:
|
||||
spec:
|
||||
containers:
|
||||
- name: cron
|
||||
image: curlimages/curl:latest
|
||||
command:
|
||||
- sh
|
||||
- -c
|
||||
- |
|
||||
curl -sf -X POST \
|
||||
-H "Authorization: Bearer $(ADMIN_TOKEN)" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '{}' \
|
||||
http://oil-calculator.oil-calculator.svc/api/cron/weekly-review
|
||||
env:
|
||||
- name: ADMIN_TOKEN
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: oil-calculator-secrets
|
||||
key: admin-token
|
||||
restartPolicy: OnFailure
|
||||
Reference in New Issue
Block a user