-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(al2023): ensure the sandbox image is present periodically
- Loading branch information
1 parent
e45e2ec
commit a15826e
Showing
2 changed files
with
24 additions
and
0 deletions.
There are no files selected for viewing
11 changes: 11 additions & 0 deletions
11
templates/al2023/runtime/rootfs/etc/systemd/system/check-sandbox-image.service
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,11 @@ | ||
[Unit] | ||
Description=Check that the sandbox image is present in the containerd content store | ||
After=containerd.service | ||
Wants=containerd.service | ||
|
||
[Service] | ||
Type=oneshot | ||
ExecStart=/usr/bin/ctr image import --namespace k8s.io /etc/eks/pause.tar | ||
|
||
[Install] | ||
WantedBy=multi-user.target |
13 changes: 13 additions & 0 deletions
13
templates/al2023/runtime/rootfs/etc/systemd/system/check-sandbox-image.timer
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,13 @@ | ||
[Unit] | ||
Description=Run check-sandbox-image periodically | ||
Requires=check-sandbox-image.service | ||
|
||
[Timer] | ||
Unit=check-sandbox-image.service | ||
# start 1 minute after boot | ||
OnBootSec=1min | ||
# run every 5 minutes | ||
OnUnitActiveSec=5min | ||
|
||
[Install] | ||
WantedBy=timers.target |