improve check for running localstack
This commit is contained in:
parent
a82cdf16de
commit
61e6578a81
1 changed files with 11 additions and 5 deletions
|
@ -13,16 +13,22 @@ function main()
|
||||||
|
|
||||||
until kubectl apply -f certificate.yaml
|
until kubectl apply -f certificate.yaml
|
||||||
do
|
do
|
||||||
echo "*** Waiting for certificate ... ***"
|
echo "[INFO] Waiting for certificate ..."
|
||||||
sleep 10
|
sleep 10
|
||||||
done
|
done
|
||||||
|
|
||||||
echo
|
echo
|
||||||
|
bash -c 'external_ip=""; while [ -z $external_ip ]; do echo "[INFO] Waiting for end point..."; external_ip=$(kubectl get ingress -o jsonpath="{$.items[*].status.loadBalancer.ingress[*].ip}"); [ -z "$external_ip" ] && sleep 10; done; echo "End point ready - $external_ip"; export endpoint=$external_ip'
|
||||||
|
|
||||||
echo
|
echo
|
||||||
echo "[INFO] Waiting for localstack health endpoint"
|
echo "Found endpoint: $endpoint"
|
||||||
until curl --connect-timeout 3 -s -f -o /dev/null "k3stesthost/health"
|
|
||||||
|
echo
|
||||||
|
until curl --silent --fail --resolve k3stesthost:80:$endpoint k3stesthost/health | grep -o '"s3": "running"'
|
||||||
do
|
do
|
||||||
sleep 1
|
curl --fail --resolve k3stesthost:80:$endpoint k3stesthost/health
|
||||||
|
echo "[INFO] Waiting for s3 running"
|
||||||
|
sleep 3
|
||||||
done
|
done
|
||||||
echo
|
echo
|
||||||
|
|
||||||
|
@ -30,7 +36,7 @@ function main()
|
||||||
|
|
||||||
export RESTIC_PASSWORD="test-password"
|
export RESTIC_PASSWORD="test-password"
|
||||||
restic init --cacert ca.crt -r s3://k3stesthost/$bucket_name
|
restic init --cacert ca.crt -r s3://k3stesthost/$bucket_name
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
main $@
|
main $@
|
||||||
|
|
Loading…
Reference in a new issue