Skip to content
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

Use ggcr library to write images with non-distributable layers #110

Merged
merged 2 commits into from
Mar 29, 2021

Conversation

DennisDenuto
Copy link
Contributor

There has been an upstream change made to ggcr that allows configuring Write and MultiWrite to write layers that have a media type of 'non-distributable'.

This PR removes the previous approach of handling writing non-dist layers, and instead delegates to the library.

Another nice benefits (apart from less code) is potential performance improvement due to de-duping layer logic now also applied to non-dist layers

- Use ggcr library to write non-distributable layers

Authored-by: Dennis Leon <[email protected]>
pkg/imgpkg/cmd/copy.go Outdated Show resolved Hide resolved
pkg/imgpkg/cmd/copy.go Outdated Show resolved Hide resolved
- Add a new line in registryOpts struct fields to separate 'groups'
- Move ImageLayerWriterFilter into tarwriter package since that is the
only place it is used now
- rename variable to make its intent more obvious
- inline the IncludeNonDistributableFlag into the `CopyOptions`

Authored-by: Dennis Leon <[email protected]>
@DennisDenuto DennisDenuto force-pushed the refactor-non-distr-layers-63 branch from 7389712 to 7df8ba2 Compare March 26, 2021 21:47
@cppforlife cppforlife merged commit 5522a3e into develop Mar 29, 2021
@joaopapereira joaopapereira deleted the refactor-non-distr-layers-63 branch May 14, 2021 13:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants