Skip to content

Commit

Permalink
Update current feature
Browse files Browse the repository at this point in the history
  • Loading branch information
fjammes committed Oct 28, 2024
1 parent 6912540 commit 5f3bf98
Showing 1 changed file with 16 additions and 4 deletions.
20 changes: 16 additions & 4 deletions wait-minio.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
set -euxo pipefail

timeout=240
wait_time=5

while true
do
Expand All @@ -15,10 +16,21 @@ do
if [ "$endpoints" ]; then
break
fi
sleep 5
ink "Minio endpoints not found, retrying in $wait_time seconds"
sleep $wait_time
done

# Wait for minio to be ready
# TODO: why wait so long?
sleep 30
ink "Wait for minio s3 bucket 'harbor' to exist"
kubectl exec -it s5cmd --env AWS_ACCESS_KEY_ID=minio --env AWS_SECRET_ACCESS_KEY=minio123 --env S3_ENDPOINT_URL=https://minio.minio:443 --command -- sleep infinity

while true
do
kubectl exec -it s5cmd -- /s5cmd --log debug --no-verify-ssl ls "s3://harbor/*"
if [ $? -eq 0 ]; then
break
else
ink "Bucket 'harbor' not found, retrying in $wait_time seconds"
sleep $wait_time
fi
done

0 comments on commit 5f3bf98

Please sign in to comment.