Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP bootstrap: change bootstrap host to replace itself with machine-os-content too #2559

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 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,21 @@ 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

hostmcd=/usr/local/bin/machine-config-daemon
bootkube_podman_run --entrypoint=sh "${MACHINE_CONFIG_OPERATOR_IMAGE}" \
cat /usr/bin/machine-config-daemon > ${hostmcd}
chmod a+x ${hostmcd}
restorecon ${hostmcd}
touch .pivot-done
${hostmcd} pivot
fi

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

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