Skip to content
Merged
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
39 changes: 0 additions & 39 deletions data/data/bootstrap/files/usr/local/bin/bootkube.sh.template
Original file line number Diff line number Diff line change
Expand Up @@ -348,45 +348,6 @@ then
record_service_stage_success
fi

if [ "$BOOTSTRAP_INPLACE" = true ] && [ ! -f cmdbootline-nto-bootstrap.done ]; then
record_service_stage_start "cmdbootline-nto-bootstrap"

rm --recursive --force cmdbootline-nto-bootstrap

# Create folders for overlay and podman command to use them
tmpfolder=$(mktemp -d)
echo ${tmpfolder}
podmancmd="bootkube_podman_run --attach=stderr --rm "
for folder in var/lib/tuned/profile-data etc/modprobe.d etc/sysconfig etc/kubernetes etc/sysctl.d etc/systemd run sys lib/modules var/lib/kubelet usr/lib/tuned etc/tuned; do
lowerfolder="/${folder}"
if [ ! -d "$lowerfolder" ]; then
echo "Skipping mounting $lowerfolder"
continue
fi
upperfolder="${tmpfolder}/${folder}/upper"
workfolder="${tmpfolder}/${folder}/work"
mkdir -p ${upperfolder}
mkdir -p ${workfolder}
podmancmd="${podmancmd} -v ${lowerfolder}:/${folder}:O,upperdir=${upperfolder},workdir=${workfolder}"
done

podmancmd="${podmancmd} --volume $PWD:/assets:z --env=CLUSTER_NODE_TUNED_BOOTSTRAP_SAFE_ENV=true --name tuned ${NODE_TUNING_OPERATOR_IMAGE}"
podmancmd="${podmancmd} render-bootcmd-mc --asset-input-dir=/assets/manifests --asset-output-dir=/assets/cmdbootline-nto-bootstrap --mcp-name=master"

# execute podmancmd
$podmancmd

#read machineconfig from --asset-ouput-dir
# Copy over manifests if they were generated by NTO
if [ -n "$(ls -A cmdbootline-nto-bootstrap)" ]; then
cp cmdbootline-nto-bootstrap/* manifests/
fi

rm -rf ${tmpfolder}
touch cmdbootline-nto-bootstrap.done
record_service_stage_success
fi

if [ ! -f mco-bootstrap.done ]
then
record_service_stage_start "mco-bootstrap"
Expand Down