-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Add oc image extract
to support release tooling
#20466
Add oc image extract
to support release tooling
#20466
Conversation
b2937f3
to
4074b4b
Compare
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: smarterclayton 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 |
/retest
…On Tue, Jul 31, 2018 at 2:41 PM OpenShift CI Robot ***@***.***> wrote:
@smarterclayton <https://github.com/smarterclayton>: The following test
*failed*, say /retest to rerun them all:
Test name Commit Details Rerun command
ci/prow/gcp 5a021fe
<5a021fe>
link
<https://openshift-gce-devel.appspot.com/build/origin-ci-test/pr-logs/pull/20466/pull-ci-origin-e2e-gcp/1816/> /test
gcp
Instructions for interacting with me using PR comments are available here
<https://git.k8s.io/community/contributors/guide/pull-requests.md>. If
you have questions or suggestions related to my behavior, please file an
issue against the kubernetes/test-infra
<https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:>
repository. I understand the commands that are listed here
<https://go.k8s.io/bot-commands>.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#20466 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABG_p3f6AJHrWFKbwOGmEwsoAN1Oo6pMks5uMKSQgaJpZM4Vmff5>
.
|
@smarterclayton how much of this overlaps with skopeo and containers/image stuff ? |
skopeo doesn't support the use cases we have here - because it downloads
into an overlay or image specific filesystem. This is more focused on
things like:
* I want to get a directory out of an image onto disk
* I want to get a specific file out of an image onto disk
* I want to leverage the above two as part of a CI flow
We're going to be using this as part of building the update payload
(because we want operators to own their config as well).
Containers image is too inconsistent with our existing stack - I do think
in the future the delta between docker/distribution, docker/archive,
containers/image, the new google/go-containerregistry, and such will
converge and that we can gradually unify the underlying tooling. But
they're not the same use cases right now.
…On Wed, Aug 1, 2018 at 5:34 AM Michal Fojtik ***@***.***> wrote:
@smarterclayton <https://github.com/smarterclayton> how much of this
overlaps with skopeo and containers/image stuff ?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#20466 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABG_p2_aEFu8u5dxLoe9RVh57LFRGXDFks5uMXYTgaJpZM4Vmff5>
.
|
/retest |
1 similar comment
/retest |
oc image extract
to support release toolingoc image extract
to support release tooling
This is needed for prototyping releasing, going to add it as experimental for 3.11 |
pkg/oc/cli/image/extract/extract.go
Outdated
|
||
flag.BoolVar(&o.OnlyFiles, "only-files", o.OnlyFiles, "Only extract regular files and directories from the image.") | ||
|
||
flag.BoolVar(&o.Force, "force", o.Force, "If set, the command will attempt to upload all layers instead of skipping those that are already uploaded.") |
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.
pretty sure the help text on this is wrong? this command doesn't upload anything
pkg/oc/cli/image/extract/extract.go
Outdated
flag.BoolVar(&o.OnlyFiles, "only-files", o.OnlyFiles, "Only extract regular files and directories from the image.") | ||
|
||
flag.BoolVar(&o.Force, "force", o.Force, "If set, the command will attempt to upload all layers instead of skipping those that are already uploaded.") | ||
flag.IntVar(&o.MaxPerRegistry, "max-per-registry", o.MaxPerRegistry, "Number of concurrent requests allowed per registry.") |
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.
when would there be more than one registry involved? (carry-over from image mirror?)
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.
You can extract two images from different registries
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.
is it necessary that we support that? I think allowing multiple images to extract from, in a single commandline, is going to frustrate our ability to support args in a sane way. Why not just support a single image to extract from, per invocation?
Among other things, this would make it easier to support multiple paths to extract (e.g. "--extract /tmp --extract /etc").
/retest |
/retest |
…s to disk Uses a subset of docker/pkg/archive that is slightly more flexible than the upstream.
5a021fe
to
76fbf4e
Compare
updated |
the flag syntax looks better to me. |
Tagging, will iterate more |
This command will be used as part of the foundation for building out our upgrade payload images (grab manifests from individual images and combine them).