Skip to content

Commit

Permalink
bootstrap: pull MCD image, copy machine-config-daemon binary and run …
Browse files Browse the repository at this point in the history
…pivot before proceeding

This ensures bootstrap node uses latest crio/kubelet from oscontainer.
  • Loading branch information
vrutkovs committed Oct 24, 2019
1 parent 88f78ac commit f8ea35d
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 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 @@ -37,6 +37,23 @@ MDNS_PUBLISHER_IMAGE=$(image_for mdns-publisher)
HAPROXY_IMAGE=$(image_for haproxy-router)
BAREMETAL_RUNTIMECFG_IMAGE=$(image_for baremetal-runtimecfg)

# Copy machine-config-daemon binary from payload and run pivot
if [ ! -f .pivot-done ]; then
mkdir /run/pivot /etc/pivot
touch /run/pivot/reboot-needed
echo "${MACHINE_CONFIG_OSCONTENT}" > /etc/pivot/image-pullspec

mkdir bin/
bootkube_podman_run \
--volume "$PWD/bin:/host/usr/local/bin:z" \
--entrypoint=sh \
"${MACHINE_CONFIG_OPERATOR_IMAGE}" \
-c "cp /usr/bin/machine-config-daemon /host/usr/local/bin"

touch .pivot-done
./bin/machine-config-daemon pivot
fi

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

if [ ! -f openshift-manifests.done ]
Expand Down

0 comments on commit f8ea35d

Please sign in to comment.