Skip to content

Commit

Permalink
Merge pull request #1762 from openshift-cherrypick-robot/cherry-pick-…
Browse files Browse the repository at this point in the history
…1761-to-release-4.1

Bug 1711844: bootkube.sh: Use pause image from payload
  • Loading branch information
openshift-merge-robot authored May 20, 2019
2 parents 3b25c88 + a109dbf commit 6a98be1
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions data/data/bootstrap/files/usr/local/bin/bootkube.sh.template
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,18 @@ OPENSHIFT_HYPERKUBE_IMAGE=$(podman run --quiet --rm ${release} image hyperkube)

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

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

mkdir --parents ./{bootstrap-manifests,manifests}

if [ ! -f cvo-bootstrap.done ]
Expand Down

0 comments on commit 6a98be1

Please sign in to comment.