imgpkg icon indicating copy to clipboard operation
imgpkg copied to clipboard

Pull imgpkg bundle contents from a tarball

Open lisamburns opened this issue 3 years ago • 5 comments

Describe the problem/challenge you have I am creating imgpkg bundles for distribution as .tar files. These bundle contents have CRDs and other resource definitions, and do not have any images that need to be relocated. In order to extract the contents from the bundle, I still have to relocate the tarball to a registry first, which seems odd.

imgpkg copy --tar <path-to-tarball> --to-repo <myregistry/mybundle>
imgpkg pull -b <myregistry/mybundle> -o /tmp/bundlecontent
kubectl apply -f /tmp/bundlecontent

Describe the solution you'd like A CLI that extracts from the tar I downloaded directly to the bundle contents without the need to copy to a registry first. imgpkg build --tar -o

Anything else you would like to add: This is the reverse/opposite of this issue: https://github.com/vmware-tanzu/carvel-imgpkg/issues/55 Slack thread: https://vmware.slack.com/archives/CUK1X0Z8Q/p1629931739341500 @aaronshurley


Vote on this request

This is an invitation to the community to vote on issues, to help us prioritize our backlog. Use the "smiley face" up to the right of this comment to vote.

👍 "I would like to see this addressed as soon as possible" 👎 "There are other more important things to focus on right now"

We are also happy to receive and review Pull Requests if you want to help working on this issue.

lisamburns avatar Aug 26 '21 00:08 lisamburns

Hey @lisamburns

Thanks for creating this issue!

Yeah I agree that the workflow you explained is odd. It requires additional steps and network overhead to use content available on local disk.

I think some further iteration on the command name should be done. My first thought is to change imgpkg build -> imgpkg extract. Perhaps even amuse the idea of adding this to the imgpkg pull command? (i.e. imgpkg pull -b root-bundle --tar <tar> -o /tmp/root-bundle)

Also, In your example, there aren't any images referenced by the bundle. But a bundle could reference hundreds of images, and if nested bundles are used, that number can be quite high. This new feature should allow the user to filter which images / bundles in a tar to extract.

I'm going to carvel accept this issue, meaning we plan on working on it in the future :-)

DennisDenuto avatar Aug 31 '21 18:08 DennisDenuto

BUMP. Can we please reprioritise this.

adamfowleruk avatar Mar 16 '22 13:03 adamfowleruk

Thanks for the bump @adamfowleruk.

@joaopapereira What are your thoughts on this?

aaronshurley avatar Mar 18 '22 05:03 aaronshurley

I like the idea that Dennis pointed out about the extract command, I think it would be easier to understand. Nevertheless, I think that we talked in the past about a reverse build option in #55 and decided to keep the push instead of creating a new command. Given that I think the implementation of imgpkg pull --tar <tar> -o /tmp/root-bundle It is something that can be done.

In terms of priority, not sure how high we can make this due to other topics that we are working on right now. But I am going to change it to a higher priority.

joaopapereira avatar Mar 18 '22 21:03 joaopapereira

If this is something that is currently blocking yll let us know and we can see how might we adjust priorities in order to help you out.

joaopapereira avatar Mar 18 '22 21:03 joaopapereira