-
Notifications
You must be signed in to change notification settings - Fork 2
/
bootstrap.sh.patch
47 lines (44 loc) · 1.66 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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
--- bootstrap.sh 2024-04-08 15:32:39
+++ patched_bootstrap.sh 2024-04-08 15:36:38
@@ -150,7 +150,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="external"
@@ -426,17 +426,28 @@
systemctl restart docker
snap set kubelet-eks \
container-runtime=docker
+
+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}"
elif [[ "$CONTAINER_RUNTIME" = "nvidia-container-runtime" ]]; then
- echo "Container runtime is ${CONTAINER_RUNTIME}"
- # update config.toml file
- # see https://github.com/NVIDIA/k8s-device-plugin
- cp /usr/local/share/eks/nvidia-runtime-config.toml /etc/containerd/config.toml
- systemctl restart containerd
+ echo "Container runtime is ${CONTAINER_RUNTIME}"
+ # update config.toml file
+ # see https://github.com/NVIDIA/k8s-device-plugin
+ cp /usr/local/share/eks/nvidia-runtime-config.toml /etc/containerd/config.toml
+ systemctl restart containerd
else
- echo "Container runtime ${CONTAINER_RUNTIME} is not supported."
- exit 1
+ echo "Custom container runtime."
fi
if [[ "$CLOUD_PROVIDER" = "external" ]]; then