Skip to content

Commit

Permalink
kubernetes: during kubelet prestart, skip pause image pull if exist
Browse files Browse the repository at this point in the history
This makes it so that if the pause container image already exists in
containerd's image store, host-ctr won't try to authenticate and pull
the pause image and let kubelet use the cached image copy.
  • Loading branch information
etungsten committed Nov 30, 2022
1 parent d1f8703 commit daf9b3f
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
3 changes: 2 additions & 1 deletion packages/kubernetes-1.21/prestart-pull-pause-ctr.conf
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ ExecStartPre=/usr/bin/host-ctr \
--namespace=k8s.io \
pull-image \
--source=${POD_INFRA_CONTAINER_IMAGE} \
--registry-config=/etc/host-containers/host-ctr.toml
--registry-config=/etc/host-containers/host-ctr.toml \
--skip-if-image-exists=true
3 changes: 2 additions & 1 deletion packages/kubernetes-1.22/prestart-pull-pause-ctr.conf
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ ExecStartPre=/usr/bin/host-ctr \
--namespace=k8s.io \
pull-image \
--source=${POD_INFRA_CONTAINER_IMAGE} \
--registry-config=/etc/host-containers/host-ctr.toml
--registry-config=/etc/host-containers/host-ctr.toml \
--skip-if-image-exists=true
3 changes: 2 additions & 1 deletion packages/kubernetes-1.23/prestart-pull-pause-ctr.conf
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ ExecStartPre=/usr/bin/host-ctr \
--namespace=k8s.io \
pull-image \
--source=${POD_INFRA_CONTAINER_IMAGE} \
--registry-config=/etc/host-containers/host-ctr.toml
--registry-config=/etc/host-containers/host-ctr.toml \
--skip-if-image-exists=true
3 changes: 2 additions & 1 deletion packages/kubernetes-1.24/prestart-pull-pause-ctr.conf
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ ExecStartPre=/usr/bin/host-ctr \
--namespace=k8s.io \
pull-image \
--source=${POD_INFRA_CONTAINER_IMAGE} \
--registry-config=/etc/host-containers/host-ctr.toml
--registry-config=/etc/host-containers/host-ctr.toml \
--skip-if-image-exists=true

0 comments on commit daf9b3f

Please sign in to comment.