64 lines
1.7 KiB
YAML
64 lines
1.7 KiB
YAML
|
|
apiVersion: batch/v1
|
||
|
|
kind: Job
|
||
|
|
metadata:
|
||
|
|
name: demo-seed-orchestrator
|
||
|
|
namespace: bakery-ia
|
||
|
|
labels:
|
||
|
|
app: demo-seed
|
||
|
|
component: initialization
|
||
|
|
annotations:
|
||
|
|
"helm.sh/hook": post-install,post-upgrade
|
||
|
|
"helm.sh/hook-weight": "25" # After procurement plans (24)
|
||
|
|
spec:
|
||
|
|
ttlSecondsAfterFinished: 3600
|
||
|
|
template:
|
||
|
|
metadata:
|
||
|
|
labels:
|
||
|
|
app: demo-seed-orchestrator
|
||
|
|
spec:
|
||
|
|
initContainers:
|
||
|
|
- name: wait-for-orchestrator-migration
|
||
|
|
image: busybox:1.36
|
||
|
|
command:
|
||
|
|
- sh
|
||
|
|
- -c
|
||
|
|
- |
|
||
|
|
echo "⏳ Waiting 30 seconds for orchestrator-migration to complete..."
|
||
|
|
sleep 30
|
||
|
|
- name: wait-for-procurement-seed
|
||
|
|
image: busybox:1.36
|
||
|
|
command:
|
||
|
|
- sh
|
||
|
|
- -c
|
||
|
|
- |
|
||
|
|
echo "⏳ Waiting 15 seconds for demo-seed-procurement to complete..."
|
||
|
|
sleep 15
|
||
|
|
containers:
|
||
|
|
- name: seed-orchestrator
|
||
|
|
image: bakery/orchestrator-service:latest
|
||
|
|
command: ["python", "/app/scripts/demo/seed_demo_orchestration_runs.py"]
|
||
|
|
env:
|
||
|
|
- name: ORCHESTRATOR_DATABASE_URL
|
||
|
|
valueFrom:
|
||
|
|
secretKeyRef:
|
||
|
|
name: database-secrets
|
||
|
|
key: ORCHESTRATOR_DATABASE_URL
|
||
|
|
- name: DATABASE_URL
|
||
|
|
valueFrom:
|
||
|
|
secretKeyRef:
|
||
|
|
name: database-secrets
|
||
|
|
key: ORCHESTRATOR_DATABASE_URL
|
||
|
|
- name: DEMO_MODE
|
||
|
|
value: "production"
|
||
|
|
- name: LOG_LEVEL
|
||
|
|
value: "INFO"
|
||
|
|
resources:
|
||
|
|
requests:
|
||
|
|
memory: "512Mi"
|
||
|
|
cpu: "200m"
|
||
|
|
limits:
|
||
|
|
memory: "1Gi"
|
||
|
|
cpu: "1000m"
|
||
|
|
restartPolicy: OnFailure
|
||
|
|
serviceAccountName: demo-seed-sa
|