forked from latchbio/sysbox-eks-ami
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbootstrap.sh.patch
32 lines (31 loc) · 1.21 KB
/
bootstrap.sh.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
--- current_bootstrap.sh 2023-08-07 21:28:54
+++ patched_bootstrap.sh 2023-08-07 21:29:11
@@ -146,7 +146,7 @@
API_RETRY_ATTEMPTS="${API_RETRY_ATTEMPTS:-3}"
DOCKER_CONFIG_JSON="${DOCKER_CONFIG_JSON:-}"
PAUSE_CONTAINER_VERSION="${PAUSE_CONTAINER_VERSION:-3.5}"
-DEFAULT_CONTAINER_RUNTIME="containerd"
+DEFAULT_CONTAINER_RUNTIME="cri-o"
CONTAINER_RUNTIME="${CONTAINER_RUNTIME:-$DEFAULT_CONTAINER_RUNTIME}"
# from >= 1.27, the cloud-provider will be external
CLOUD_PROVIDER="aws"
@@ -429,6 +429,20 @@
# see https://github.com/NVIDIA/k8s-device-plugin
cp /usr/local/share/eks/nvidia-runtime-config.toml /etc/containerd/config.toml
systemctl restart containerd
+
+elif [[ "$CONTAINER_RUNTIME" = "cri-o" ]]; then
+ echo "Container runtime is CRI-O"
+ snap set kubelet-eks \
+ container-runtime=remote \
+ container-runtime-endpoint=unix:///var/run/crio/crio.sock
+ dasel put \
+ string \
+ --parser toml \
+ --file /etc/crio/crio.conf \
+ --selector 'crio.image.pause_image' \
+ "${PAUSE_CONTAINER}"
+ rm --force /run/dockershim.sock
+ ln -sf /run/crio/crio.sock /run/dockershim.sock
else
echo "Container runtime ${CONTAINER_RUNTIME} is not supported."