Improve kubernetes for prod
This commit is contained in:
@@ -18,9 +18,14 @@ spec:
|
||||
spec:
|
||||
serviceAccountName: demo-seed-sa
|
||||
initContainers:
|
||||
- name: wait-for-db
|
||||
image: postgres:17-alpine
|
||||
command: ["sh", "-c", "until pg_isready -h tenant-db-service -p 5432; do sleep 2; done"]
|
||||
- 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"
|
||||
@@ -28,9 +33,18 @@ spec:
|
||||
limits:
|
||||
memory: "128Mi"
|
||||
cpu: "100m"
|
||||
- name: wait-for-migration
|
||||
image: bitnami/kubectl:latest
|
||||
command: ["sh", "-c", "until kubectl wait --for=condition=complete --timeout=300s job/tenant-migration -n bakery-ia 2>/dev/null; do echo 'Waiting for tenant migration...'; sleep 5; done"]
|
||||
- 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"
|
||||
|
||||
Reference in New Issue
Block a user