Add improvements

This commit is contained in:
Urtzi Alfaro
2026-01-12 14:24:14 +01:00
parent 6037faaf8c
commit 230bbe6a19
61 changed files with 1668 additions and 894 deletions

View File

@@ -1,76 +0,0 @@
# Seed job for PILOT2025 coupon - runs after tenant migration
apiVersion: batch/v1
kind: Job
metadata:
name: tenant-seed-pilot-coupon
namespace: bakery-ia
labels:
app.kubernetes.io/name: tenant-seed-pilot-coupon
app.kubernetes.io/component: seed
app.kubernetes.io/part-of: bakery-ia
spec:
backoffLimit: 3
template:
metadata:
labels:
app.kubernetes.io/name: tenant-seed-pilot-coupon
app.kubernetes.io/component: seed
spec:
imagePullSecrets:
- name: dockerhub-creds
serviceAccountName: demo-seed-sa
initContainers:
- name: wait-for-tenant-migration
image: busybox:1.36
command:
- sh
- -c
- |
echo "Waiting 30 seconds for tenant-migration to complete..."
sleep 30
resources:
requests:
memory: "64Mi"
cpu: "50m"
limits:
memory: "128Mi"
cpu: "100m"
- name: wait-for-tenant-service
image: curlimages/curl:latest
command:
- sh
- -c
- |
echo "Waiting for tenant-service to be ready..."
until curl -f http://tenant-service.bakery-ia.svc.cluster.local:8000/health/ready > /dev/null 2>&1; do
echo "tenant-service not ready yet, waiting..."
sleep 5
done
echo "tenant-service is ready!"
resources:
requests:
memory: "64Mi"
cpu: "50m"
limits:
memory: "128Mi"
cpu: "100m"
containers:
- name: seed-coupon
image: bakery/tenant-service:dev
command: ["python", "/app/scripts/seed_pilot_coupon.py"]
env:
- name: TENANT_DATABASE_URL
valueFrom:
secretKeyRef:
name: database-secrets
key: TENANT_DATABASE_URL
- name: LOG_LEVEL
value: "INFO"
resources:
requests:
memory: "256Mi"
cpu: "100m"
limits:
memory: "512Mi"
cpu: "500m"
restartPolicy: OnFailure