2025-10-09 14:11:02 +02:00
|
|
|
# infrastructure/kubernetes/base/cronjobs/external-data-rotation-cronjob.yaml
|
|
|
|
|
# Monthly CronJob to rotate 24-month sliding window (runs 1st of month at 2am UTC)
|
|
|
|
|
apiVersion: batch/v1
|
|
|
|
|
kind: CronJob
|
|
|
|
|
metadata:
|
Update images for services: ai_insights,alert_processor,auth,demo_session,distribution,external,forecasting,inventory,notification,orchestrator,orders,pos,procurement,production,recipes,sales,suppliers,tenant,training,gateway [skip ci]
2026-01-24 20:51:43 +00:00
|
|
|
name: external-data-rotation-0e95bdc4
|
2025-10-09 14:11:02 +02:00
|
|
|
namespace: bakery-ia
|
|
|
|
|
labels:
|
|
|
|
|
app: external-service
|
|
|
|
|
component: data-rotation
|
|
|
|
|
spec:
|
|
|
|
|
schedule: "0 2 1 * *"
|
|
|
|
|
|
|
|
|
|
successfulJobsHistoryLimit: 3
|
|
|
|
|
failedJobsHistoryLimit: 3
|
|
|
|
|
|
|
|
|
|
concurrencyPolicy: Forbid
|
|
|
|
|
|
|
|
|
|
jobTemplate:
|
|
|
|
|
metadata:
|
|
|
|
|
labels:
|
|
|
|
|
app: external-service
|
|
|
|
|
job: data-rotation
|
|
|
|
|
spec:
|
|
|
|
|
ttlSecondsAfterFinished: 172800
|
|
|
|
|
backoffLimit: 2
|
|
|
|
|
|
|
|
|
|
template:
|
|
|
|
|
metadata:
|
|
|
|
|
labels:
|
|
|
|
|
app: external-service
|
|
|
|
|
cronjob: data-rotation
|
|
|
|
|
spec:
|
|
|
|
|
restartPolicy: OnFailure
|
|
|
|
|
|
|
|
|
|
containers:
|
|
|
|
|
- name: data-rotator
|
Update images for services: ai_insights,alert_processor,auth,demo_session,distribution,external,forecasting,inventory,notification,orchestrator,orders,pos,procurement,production,recipes,sales,suppliers,tenant,training,gateway [skip ci]
2026-01-24 20:51:43 +00:00
|
|
|
image: registry.bakewise.ai/bakery-admin/external:0e95bdc4685be715dca600c0e4f5c583ff0418c7
|
2025-10-09 14:11:02 +02:00
|
|
|
imagePullPolicy: Always
|
|
|
|
|
|
|
|
|
|
command:
|
|
|
|
|
- python
|
|
|
|
|
- -m
|
|
|
|
|
- app.jobs.rotate_data
|
|
|
|
|
|
|
|
|
|
args:
|
|
|
|
|
- "--log-level=INFO"
|
|
|
|
|
- "--notify-slack=true"
|
|
|
|
|
|
|
|
|
|
envFrom:
|
|
|
|
|
- configMapRef:
|
|
|
|
|
name: bakery-config
|
|
|
|
|
- secretRef:
|
|
|
|
|
name: database-secrets
|
|
|
|
|
- secretRef:
|
|
|
|
|
name: external-api-secrets
|
|
|
|
|
- secretRef:
|
|
|
|
|
name: monitoring-secrets
|
|
|
|
|
|
|
|
|
|
resources:
|
|
|
|
|
requests:
|
|
|
|
|
memory: "512Mi"
|
|
|
|
|
cpu: "250m"
|
|
|
|
|
limits:
|
|
|
|
|
memory: "1Gi"
|
|
|
|
|
cpu: "500m"
|