mirror of
https://github.com/hanzoai/models.git
synced 2026-10-30 14:53:33 +00:00
31 lines
804 B
YAML
31 lines
804 B
YAML
apiVersion: batch/v1
|
|
kind: CronJob
|
|
metadata:
|
|
name: models-sync
|
|
namespace: hanzo
|
|
spec:
|
|
schedule: "0 4 * * *"
|
|
concurrencyPolicy: Forbid
|
|
successfulJobsHistoryLimit: 3
|
|
failedJobsHistoryLimit: 3
|
|
jobTemplate:
|
|
spec:
|
|
backoffLimit: 2
|
|
template:
|
|
spec:
|
|
restartPolicy: Never
|
|
containers:
|
|
- name: sync
|
|
image: curlimages/curl:latest
|
|
command:
|
|
- /bin/sh
|
|
- -c
|
|
- |
|
|
curl -sf --max-time 300 -X POST \
|
|
-H "Authorization: Bearer ${MODELS_API_KEY}" \
|
|
http://models.hanzo.svc.cluster.local/v1/sync
|
|
envFrom:
|
|
- secretRef:
|
|
name: models-secrets
|
|
optional: true
|