Skip to content

Commit 36cfd4f

Browse files
feat(al2023): ensure the sandbox image is present periodically
1 parent e45e2ec commit 36cfd4f

File tree

3 files changed

+26
-0
lines changed

3 files changed

+26
-0
lines changed

templates/al2023/provisioners/cache-pause-container.sh

+2
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,5 @@ set -o pipefail
77
sudo systemctl start containerd
88
cache-pause-container -i ${PAUSE_CONTAINER_IMAGE}
99
sudo systemctl stop containerd
10+
11+
sudo systemctl enable check-sandbox-image.timer
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
[Unit]
2+
Description=Check that the sandbox image is present in the containerd content store
3+
After=containerd.service
4+
Wants=containerd.service
5+
6+
[Service]
7+
Type=oneshot
8+
ExecStart=/usr/bin/ctr image import --namespace k8s.io /etc/eks/pause.tar
9+
10+
[Install]
11+
WantedBy=multi-user.target
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
[Unit]
2+
Description=Run check-sandbox-image periodically
3+
Requires=check-sandbox-image.service
4+
5+
[Timer]
6+
Unit=check-sandbox-image.service
7+
# start 1 minute after boot
8+
OnBootSec=1min
9+
# run every 5 minutes
10+
OnUnitActiveSec=5min
11+
12+
[Install]
13+
WantedBy=timers.target

0 commit comments

Comments
 (0)