Skip to content

Commit

Permalink
Revert "Pull sandbox image periodically (#1601)" (#1611)
Browse files Browse the repository at this point in the history
  • Loading branch information
cartermckinnon authored Feb 1, 2024
1 parent 824c55e commit 6044c59
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 17 deletions.
3 changes: 0 additions & 3 deletions files/bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 0 additions & 9 deletions files/sandbox-image.timer

This file was deleted.

5 changes: 1 addition & 4 deletions scripts/install-worker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)

Expand Down
2 changes: 1 addition & 1 deletion test/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 6044c59

Please sign in to comment.