apiVersion: batch/v1 kind: Job metadata: name: demo-seed-inventory namespace: bakery-ia labels: app: demo-seed component: initialization annotations: "helm.sh/hook": post-install,post-upgrade "helm.sh/hook-weight": "15" spec: ttlSecondsAfterFinished: 3600 template: metadata: labels: app: demo-seed-inventory spec: initContainers: - name: wait-for-inventory-migration image: busybox:1.36 command: - sh - -c - | echo "Waiting 30 seconds for inventory-migration to complete..." sleep 30 - name: wait-for-inventory-service image: curlimages/curl:latest command: - sh - -c - | echo "Waiting for inventory-service to be ready..." until curl -f http://inventory-service.bakery-ia.svc.cluster.local:8000/health/ready > /dev/null 2>&1; do echo "inventory-service not ready yet, waiting..." sleep 5 done echo "inventory-service is ready!" containers: - name: seed-inventory image: bakery/inventory-service:latest command: ["python", "/app/scripts/demo/seed_demo_inventory.py"] env: - name: INVENTORY_DATABASE_URL valueFrom: secretKeyRef: name: database-secrets key: INVENTORY_DATABASE_URL - name: DEMO_MODE value: "production" - name: LOG_LEVEL value: "INFO" resources: requests: memory: "256Mi" cpu: "100m" limits: memory: "512Mi" cpu: "500m" restartPolicy: OnFailure serviceAccountName: demo-seed-sa