Initial commit: Essential Oil Formula Cost Calculator

This commit is contained in:
2026-04-06 13:46:32 +00:00
commit 0368e85abe
25 changed files with 20897 additions and 0 deletions

30
deploy/cronjob.yaml Normal file
View 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