-
Notifications
You must be signed in to change notification settings - Fork 229
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Mario Manno
committed
Sep 19, 2023
1 parent
b9bcb1a
commit cc47d56
Showing
5 changed files
with
36 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#!/bin/bash | ||
|
||
set -euxo pipefail | ||
|
||
container=${1:-k3d-upstream} | ||
name=${2:-fleet} | ||
shift | ||
shift | ||
|
||
echo "Run k3d import with \"$*\" and retry if '$name' is not found in 'critcl images' output" | ||
|
||
i=0 | ||
while ! ( docker exec "$container"-server-0 /bin/crictl images | grep -q "$name" ); do | ||
i=$((i + 1)) | ||
if (( i > 3 )); then | ||
echo "failed to import images" | ||
exit 1 | ||
fi | ||
k3d image import "$@" | ||
# crictl images doesn't show the image immediately after import | ||
sleep 20 | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters