New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WIP: [V2] CFE-971: create and mirror a graph image for ocp releases #721
Conversation
@sherine-k: This pull request references CFE-971 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.15.0" version, but no target version was set. In 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 kubernetes/test-infra repository. |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: sherine-k The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great that you got it working with buildah, well done @sherine-k
cmd/oc-mirror/main.go
Outdated
// oc-mirror runs in rootless mode. It is therefore necessary to | ||
// ensure that oc-mirror is re-executed in a user namespace where | ||
// it has root privileges. | ||
if buildah.InitReexec() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sherine-k - should we not gate this ? i.e move it to the executor.go , and only set this if we have graph: true set
I see the e2e test failing here
|
@sherine-k: This pull request references CFE-971 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.15.0" version, but no target version was set. In 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 kubernetes/test-infra repository. |
E2E is failing because these tests would be running in a container on a k8s cluster.
I'll privilege first a way to use unshare only in v2, so that e2e aren't affected for the moment. |
/test images |
Team decision is to use a different implementation (with |
@sherine-k: all tests passed! Full PR test history. Your PR dashboard. 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 kubernetes/test-infra repository. I understand the commands that are listed here. |
Description
When the user specifies
graph: true
in the imageSetConfig (mirror.platform.graph
), oc-mirror generates a graph-image (following directives from this doc and pushes it to the specified disk or mirror.In order to have retro-compatibility in v2, and in order to reduce the module dependencies of oc-mirror, the implementation suggested in this PR is based on containers/buildah, instead of the existing implementation with go-containerregistry and crane
Fixes CFE-971
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
With the following imageSetConfig:
We can run oc-mirror for MirrorToDisk first: This will create a
graph-image
and save it to local storageNext, we can perform a DiskToMirror, which would push the graph-image, along with release images, to the mirror
Expected Outcome
After mirroring is complete, we need to check the graph-image:
root
.This can be achieved like this for example: