[release-4.21] OCPBUGS-76823: reduce MCO image size#5657
[release-4.21] OCPBUGS-76823: reduce MCO image size#5657openshift-cherrypick-robot wants to merge 2 commits intoopenshift:release-4.21from
Conversation
In lieu of mounting package caches at build-time, we should clear them after package installation. Because the DNF wrapper sets the repo configuration differently in local vs. CI builds, this will only yield a ~44 MB reduction for local builds. However, it will yield a ~1.2 GB reduction for images built by CI.
Early versions of Buildah and/or OpenShift Image Builder presumably did not support path globbing for COPY directives, which required us to create a tarball and copy it into the final image. Although the tarball is deleted immediately after extraction, it still persists as an image layer when building an image locally due to the COPY directive. This unnecessary layer increases overall image size by ~480 MB. This is only the case for local image builds since OpenShift CI is configured to squash the final image layers, which makes this a non-issue for release images.
|
@openshift-cherrypick-robot: Jira Issue OCPBUGS-76450 has been cloned as Jira Issue OCPBUGS-76823. Will retitle bug to link to clone. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
|
@openshift-cherrypick-robot: This pull request references Jira Issue OCPBUGS-76823, which is invalid:
Comment The bug has been updated to refer to the pull request using the external bug tracker. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: openshift-cherrypick-robot The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
@openshift-cherrypick-robot: The following tests failed, say
Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
This is an automated cherry-pick of #5644
/assign cheesesashimi