Support config pause image for crio

In some places of which network environment was limited, ciro can't
pull images from k8s.gcr.io. This patch add a variable
`CRIO_PAUSE_IMAGE` in order to the developer who located in these
places can set the ciro to pull pause container images from
repository that they can access.

The `CRIO_PAUSE_COMMAND` used to configure crio's `pause_command`
(the pause container's bootstrap command), in order to the developer
can use the special pause image the they customized.

Change-Id: Ib0d4c42870d40ef583546758513a36b906c7663b
This commit is contained in:
yangjianfeng 2022-03-20 11:47:25 +08:00
parent 90b4089cda
commit f935202d39
2 changed files with 6 additions and 0 deletions

View File

@ -78,6 +78,8 @@ function configure_crio {
# We're wrapping values in \"<val>\" because that's the format cri-o wants.
iniset -sudo ${CRIO_CONF} crio.api listen \"${CRIO_ENGINE_SOCKET_FILE}\"
iniset -sudo ${CRIO_CONF} crio.image pause_image \"${CRIO_PAUSE_IMAGE}\"
iniset -sudo ${CRIO_CONF} crio.image pause_command \"${CRIO_PAUSE_COMMAND}\"
if [[ "$ENABLE_DEBUG_LOG_LEVEL" == "True" ]]; then
# debug is way too verbose, info will be enough
iniset -sudo ${CRIO_CONF} crio.runtime log_level \"info\"

View File

@ -27,3 +27,7 @@ fi
# Customize kubeadm container images repository
KUBEADMIN_IMAGE_REPOSITORY=${KUBEADMIN_IMAGE_REPOSITORY:-"k8s.gcr.io"}
# Configure crio pause image
CRIO_PAUSE_IMAGE=${CRIO_PAUSE_IMAGE:-"k8s.gcr.io/pause:3.6"}
CRIO_PAUSE_COMMAND=${CRIO_PAUSE_COMMAND:-"/pause"}