From 4a28e0716b67b8b52feb413ba2c05b146fc7a8b2 Mon Sep 17 00:00:00 2001 From: William Lam Date: Fri, 4 Aug 2023 12:56:23 -0700 Subject: [PATCH] fix: Replace Containerd config with pause container from VEBA BOM Closes: #1085 Signed-off-by: William Lam --- scripts/photon-settings.sh | 6 ++++++ veba-bom.json | 4 ---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/scripts/photon-settings.sh b/scripts/photon-settings.sh index 60def6b0..2a6ed08e 100644 --- a/scripts/photon-settings.sh +++ b/scripts/photon-settings.sh @@ -78,6 +78,12 @@ curl -L https://github.com/containerd/containerd/releases/download/v${CONTAINERD tar -zxvf /root/download/containerd-${CONTAINERD_VERSION}-linux-amd64.tar.gz -C /usr rm -f /root/download/containerd-${CONTAINERD_VERSION}-linux-amd64.tar.gz containerd config default > /etc/containerd/config.toml + +# Update default version of the pause container to the one from VEBA BOM +PAUSE_CONTAINER_NAME="registry.k8s.io/pause" +PAUSE_CONTAINER_VERSION=$(jq -r --arg PAUSE_CONTAINER_NAME ${PAUSE_CONTAINER_NAME} '.kubernetes.containers[] | select(.name == $PAUSE_CONTAINER_NAME) | .version' ${VEBA_BOM_FILE}) +sed -i "s#sandbox_image.*#sandbox_image = \"${PAUSE_CONTAINER_NAME}:${PAUSE_CONTAINER_VERSION}\"#g" /etc/containerd/config.toml + cat > /usr/lib/systemd/system/containerd.service <