Skip to content

Commit

Permalink
Skip sandbox image pull if already present (#1090)
Browse files Browse the repository at this point in the history
  • Loading branch information
vpineda1996 authored Nov 22, 2022
1 parent 06fb2fc commit 6676005
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions files/pull-sandbox-image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,10 @@
set -euo pipefail

sandbox_image="$(awk -F'[ ="]+' '$1 == "sandbox_image" { print $2 }' /etc/containerd/config.toml)"

### Short-circuit fetching sandbox image if its already present
if [[ "$(sudo ctr --namespace k8s.io image ls | grep $sandbox_image)" != "" ]]; then
exit 0
fi

/etc/eks/containerd/pull-image.sh "${sandbox_image}"

0 comments on commit 6676005

Please sign in to comment.