From 6044c59bea1971754ec0ce8c002a9a01241787d8 Mon Sep 17 00:00:00 2001 From: Carter Date: Thu, 1 Feb 2024 10:29:31 -0800 Subject: [PATCH] Revert "Pull sandbox image periodically (#1601)" (#1611) --- files/bootstrap.sh | 3 --- files/sandbox-image.timer | 9 --------- scripts/install-worker.sh | 5 +---- test/Dockerfile | 2 +- 4 files changed, 2 insertions(+), 17 deletions(-) delete mode 100644 files/sandbox-image.timer diff --git a/files/bootstrap.sh b/files/bootstrap.sh index b133b55d9..42567a495 100755 --- a/files/bootstrap.sh +++ b/files/bootstrap.sh @@ -575,13 +575,10 @@ if [[ "$CONTAINER_RUNTIME" = "containerd" ]]; then if ! cmp -s /etc/eks/containerd/containerd-config.toml /etc/containerd/config.toml; then sudo cp -v /etc/eks/containerd/containerd-config.toml /etc/containerd/config.toml sudo cp -v /etc/eks/containerd/sandbox-image.service /etc/systemd/system/sandbox-image.service - sudo cp -v /etc/eks/containerd/sandbox-image.timer /etc/systemd/system/sandbox-image.timer sudo chown root:root /etc/systemd/system/sandbox-image.service - sudo chown root:root /etc/systemd/system/sandbox-image.timer systemctl daemon-reload systemctl enable containerd sandbox-image systemctl restart sandbox-image containerd - systemctl enable --now sandbox-image.timer fi sudo cp -v /etc/eks/containerd/kubelet-containerd.service /etc/systemd/system/kubelet.service sudo chown root:root /etc/systemd/system/kubelet.service diff --git a/files/sandbox-image.timer b/files/sandbox-image.timer deleted file mode 100644 index 7b4514f4f..000000000 --- a/files/sandbox-image.timer +++ /dev/null @@ -1,9 +0,0 @@ -[Unit] -Description=Pulls the containerd sandbox image periodically - -[Timer] -OnUnitActiveSec=60 -Persistent=true - -[Install] -WantedBy=timers.target diff --git a/scripts/install-worker.sh b/scripts/install-worker.sh index 15211211f..e61ca9d21 100644 --- a/scripts/install-worker.sh +++ b/scripts/install-worker.sh @@ -184,7 +184,6 @@ fi sudo mv $WORKING_DIR/kubelet-containerd.service /etc/eks/containerd/kubelet-containerd.service sudo mv $WORKING_DIR/sandbox-image.service /etc/eks/containerd/sandbox-image.service -sudo mv $WORKING_DIR/sandbox-image.timer /etc/eks/containerd/sandbox-image.timer sudo mv $WORKING_DIR/pull-sandbox-image.sh /etc/eks/containerd/pull-sandbox-image.sh sudo mv $WORKING_DIR/pull-image.sh /etc/eks/containerd/pull-image.sh sudo chmod +x /etc/eks/containerd/pull-sandbox-image.sh @@ -414,12 +413,10 @@ if [[ "$CACHE_CONTAINER_IMAGES" == "true" ]] && ! [[ ${ISOLATED_REGIONS} =~ $BIN cat /etc/eks/containerd/containerd-config.toml | sed s,SANDBOX_IMAGE,$PAUSE_CONTAINER,g | sudo tee /etc/eks/containerd/containerd-cached-pause-config.toml sudo cp -v /etc/eks/containerd/containerd-cached-pause-config.toml /etc/containerd/config.toml sudo cp -v /etc/eks/containerd/sandbox-image.service /etc/systemd/system/sandbox-image.service - sudo cp -v /etc/eks/containerd/sandbox-image.timer /etc/systemd/system/sandbox-image.timer sudo chown root:root /etc/systemd/system/sandbox-image.service - sudo chown root:root /etc/systemd/system/sandbox-image.timer sudo systemctl daemon-reload sudo systemctl start containerd - sudo systemctl enable containerd sandbox-image sandbox-image.timer + sudo systemctl enable containerd sandbox-image K8S_MINOR_VERSION=$(echo "${KUBERNETES_VERSION}" | cut -d'.' -f1-2) diff --git a/test/Dockerfile b/test/Dockerfile index b4ba499c6..d00837c3e 100644 --- a/test/Dockerfile +++ b/test/Dockerfile @@ -10,7 +10,7 @@ COPY --from=aemm /ec2-metadata-mock /sbin/ec2-metadata-mock RUN mkdir -p /etc/systemd/system RUN mkdir -p /etc/eks/containerd COPY files/ /etc/eks/ -COPY files/containerd-config.toml files/kubelet-containerd.service files/pull-sandbox-image.sh files/sandbox-image.service files/sandbox-image.timer /etc/eks/containerd/ +COPY files/containerd-config.toml files/kubelet-containerd.service files/pull-sandbox-image.sh files/sandbox-image.service /etc/eks/containerd/ COPY files/kubelet-config.json /etc/kubernetes/kubelet/kubelet-config.json COPY files/kubelet-kubeconfig /var/lib/kubelet/kubeconfig COPY files/ecr-credential-provider-config.json /etc/eks/image-credential-provider/config.json