[release-4.20] OCPBUGS-77064: reduce MCO image size#5673
[release-4.20] OCPBUGS-77064: reduce MCO image size#5673openshift-cherrypick-robot wants to merge 2 commits intoopenshift:release-4.20from
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-76823 has been cloned as Jira Issue OCPBUGS-77064. 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-77064, 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. |
|
/assign @cheesesashimi |
isabella-janssen
left a comment
There was a problem hiding this comment.
/label backport-risk-assessed
/lgtm
Clean backport
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: isabella-janssen, openshift-cherrypick-robot The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/verified later @sergiordlr,@ptalgulk01 This bug fix will be verified post-merge. |
|
/retest-required |
|
@isabella-janssen: This PR has been marked to be verified later by 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: 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 #5657
/assign isabella-janssen
/cherrypick release-4.19 release-4.18 release-4.17