fix(helm): switch migrate init container from busybox to alpine
busybox:1.37 nc -z is broken (outputs "punt!" and hangs). Alpine 3.21 ships a working nc -z implementation.
This commit is contained in:
@@ -34,7 +34,7 @@ spec:
|
||||
initContainers:
|
||||
# Wait for CNPG to provision the cluster and secret before migrating
|
||||
- name: wait-for-postgres
|
||||
image: busybox:1.37
|
||||
image: alpine:3.21
|
||||
resources:
|
||||
requests:
|
||||
cpu: 10m
|
||||
@@ -52,7 +52,7 @@ spec:
|
||||
- -c
|
||||
- |
|
||||
echo "Waiting for PostgreSQL..."
|
||||
until nc -w 2 "$DB_HOST" "$DB_PORT" < /dev/null; do
|
||||
until nc -z -w 2 "$DB_HOST" "$DB_PORT" 2>/dev/null; do
|
||||
sleep 3
|
||||
done
|
||||
echo "PostgreSQL is reachable"
|
||||
|
||||
Reference in New Issue
Block a user