Skip to content

Commit 7992b05

Browse files
committed
pre-pull pod images
Signed-off-by: Tarun Pothulapati <[email protected]>
1 parent 6182e6a commit 7992b05

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

entrypoint.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,14 @@ yq e -i ".observability.logLevel = \"debug\"" config.yaml
8686
yq e -i '.workspace.runtime.containerdSocket = "/run/k3s/containerd/containerd.sock"' config.yaml
8787
yq e -i '.workspace.runtime.containerdRuntimeDir = "/var/lib/rancher/k3s/agent/containerd/io.containerd.runtime.v2.task/k8s.io/"' config.yaml
8888

89+
echo "extracting images to download ahead..."
90+
/gitpod-installer render --config config.yaml | grep 'image:' | sed 's/ *//g' | sed 's/image://g' | sed 's/\"//g' | sed 's/^-//g' | sort | uniq > /gitpod-images.txt
91+
echo "downloading images..."
92+
cat /gitpod-images.txt | while read image
93+
do
94+
ctr images pull $image &>/dev/null &
95+
done
96+
8997
/gitpod-installer render --config config.yaml --output-split-files /var/lib/rancher/k3s/server/manifests/gitpod
9098
for f in /var/lib/rancher/k3s/server/manifests/gitpod/*.yaml; do (cat "$f"; echo) >> /var/lib/rancher/k3s/server/gitpod.debug; done
9199
rm /var/lib/rancher/k3s/server/manifests/gitpod/*NetworkPolicy*

0 commit comments

Comments
 (0)