Skip to content

Commit 6a98be1

Browse files
Merge pull request #1762 from openshift-cherrypick-robot/cherry-pick-1761-to-release-4.1
Bug 1711844: bootkube.sh: Use pause image from payload
2 parents 3b25c88 + a109dbf commit 6a98be1

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

data/data/bootstrap/files/usr/local/bin/bootkube.sh.template

+12
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,18 @@ OPENSHIFT_HYPERKUBE_IMAGE=$(podman run --quiet --rm ${release} image hyperkube)
3838

3939
CLUSTER_BOOTSTRAP_IMAGE=$(podman run --quiet --rm ${release} image cluster-bootstrap)
4040

41+
# Now, as early as possible we replace the pause image and reload crio to use it, to ensure
42+
# that we're using the pause image from our payload just like the primary cluster.
43+
# The config should match the one generated by the MCO ideally:
44+
# https://github.com/openshift/machine-config-operator/blob/e861ccb12f09c7c768d51fdf0a17879fcc9a87d5/templates/master/01-master-container-runtime/_base/files/crio.yaml
45+
# But for now we're just changing the key bits: image and command.
46+
# Perhaps down the line we change this to run something like:
47+
# podman run machine-config-daemon bootstrap ... (passing the release image and the host rootfs)
48+
sed -i -e 's,pause_image *=.*,pause_image = "'${MACHINE_CONFIG_INFRA_IMAGE}'",' /etc/crio/crio.conf
49+
sed -i -e 's,pause_command *=.*,pause_command = "/usr/bin/pod",' /etc/crio/crio.conf
50+
# Note crio today has a reload command but it just dies from the SIGHUP sent...
51+
systemctl restart cri-o.service
52+
4153
mkdir --parents ./{bootstrap-manifests,manifests}
4254

4355
if [ ! -f cvo-bootstrap.done ]

0 commit comments

Comments
 (0)