Skip to content

Commit

Permalink
Exclude extensions container for FCOS
Browse files Browse the repository at this point in the history
This excludes all non-base (right now, only extensions) images from
image-references if the build is using fcos, because we currently don't
ship fcos extensions images, and including them would break the
payload.

This also removes the baseOSExtensionsContainerImage from the osimagurl
configmap so the placeholder value doesn't get passed through. (oc won't
rewrite it if it's not in image-references).
  • Loading branch information
jkyros committed Sep 27, 2022
1 parent e505cb7 commit e26e51e
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,14 @@ ARG TAGS=""
COPY --from=builder /go/src/github.com/openshift/machine-config-operator/instroot.tar /tmp/instroot.tar
RUN cd / && tar xf /tmp/instroot.tar && rm -f /tmp/instroot.tar
COPY install /manifests
RUN if [[ "${TAGS}" == "fcos" ]]; then sed -i 's/rhel-coreos-8/fedora-coreos/g' /manifests/*; \

RUN if [[ "${TAGS}" == "fcos" ]]; then \
# comment out non-base/extensions image-references entirely for fcos
sed -i '/- name: rhel-coreos-8-/,+3 s/^/#/' /manifests/image-references && \
# also remove extensions from the osimageurl configmap (if we don't, oc won't rewrite it, and the placeholder value will survive and get used)
sed -i '/baseOSExtensionsContainerImage:/ s/^/#/' /manifests/0000_80_machine-config-operator_05_osimageurl.yaml && \
# rewrite image names for fcos
sed -i 's/rhel-coreos-8/fedora-coreos/g' /manifests/* ; \
elif [[ "${TAGS}" == "scos" ]]; then sed -i 's/rhel-coreos-8/centos-stream-coreos-9/g' /manifests/*; fi && \
if ! rpm -q util-linux; then yum install -y util-linux && yum clean all && rm -rf /var/cache/yum/*; fi
COPY templates /etc/mcc/templates
Expand Down

0 comments on commit e26e51e

Please sign in to comment.