Skip to content

Commit

Permalink
Extract the image-references file from the release
Browse files Browse the repository at this point in the history
Previously all the MCO needed was the machine-os-content image, which
became osImageURL, but now that we have new format images, extension
containers, and probably a pair (one new format image, one extension
container) per RHCOS major version (rhel-coreos-8, rhel-coreos-9, etc)
we need to consume more than one image out of the payload.

As a result, the MCO needs the image-references file so that it can read all of the
OS images contained within and select the one it prefers.

This dumps the image-references file out of the payload so the MCO can
consume it, and also adds an argument to the `machine-config-operator`
call to consume it.
  • Loading branch information
jkyros committed Jul 18, 2022
1 parent 3a943ba commit cdf7858
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 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 @@ -293,6 +293,11 @@ then
ADDITIONAL_FLAGS="${ADDITIONAL_FLAGS} --cloud-config-file=/assets/config-bootstrap/cloud-provider-config-generated.yaml"
fi

# populate image reference file so the MCO can consume multiple/additional image references
echo "Dumping out image reference file..."
podman run --quiet --rm --net=none --entrypoint="cat" "${RELEASE_IMAGE_DIGEST}" "/release-manifests/image-references" > image-references
echo "Returned $?"

bootkube_podman_run \
--name mco-render \
--user 0 \
Expand All @@ -312,6 +317,7 @@ then
--haproxy-image="${HAPROXY_IMAGE}" \
--baremetal-runtimecfg-image="${BAREMETAL_RUNTIMECFG_IMAGE}" \
--release-image="${RELEASE_IMAGE_DIGEST}" \
--image-references=assets/image-references \
${ADDITIONAL_FLAGS}

# Bootstrap MachineConfigController uses /etc/mcc/bootstrap/manifests/ dir to
Expand Down

0 comments on commit cdf7858

Please sign in to comment.