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

push: support to specify the compression format #3532

Conversation

giuseppe
Copy link
Member

@giuseppe giuseppe commented Sep 22, 2021

add two new flags to "buildah push" to allow tweaking the compression
format for the data layers.

The flag --compression-format allows users to specify the compression
algorithm to use.

With --compression-level it is possible to tweak the compression
level.

An image usage for partial pulls can be pushed with:

$ buildah push --compression-format zstd:chunked FOO

Signed-off-by: Giuseppe Scrivano gscrivan@redhat.com

What type of PR is this?

/kind feature

What this PR does / why we need it:

It allows users to specify the compression for the image data layers.

How to verify it

buildah push --compression-format zstd:chunked FOO dir:/tmp/foo

The files under /tmp/foo are compressed with zstd.

Which issue(s) this PR fixes:

None

Special notes for your reviewer:

Does this PR introduce a user-facing change?

push has two new flags to allow tweaking the compression format for the data layers.
The flag --compression-format allows users to specify the compression algorithm to use, while with --compression-level it is possible to tweak the compression level.

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Sep 22, 2021

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: giuseppe

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@nalind
Copy link
Member

nalind commented Sep 22, 2021

Does this work with every transport?

@giuseppe
Copy link
Member Author

I've tested it with docker, oci and dir.

cmd/buildah/push.go Outdated Show resolved Hide resolved
@giuseppe giuseppe force-pushed the support-compression-format-level branch from 706d2a3 to 2f8ec4b Compare September 22, 2021 19:11
@giuseppe giuseppe force-pushed the support-compression-format-level branch from 2f8ec4b to 7fa21cf Compare September 22, 2021 21:13
add two new flags to "buildah push" to allow tweaking the compression
format for the data layers.

The flag --compression-format allows users to specify the compression
algorithm to use.

With --compression-level it is possible to tweak the compression
level.

An image usage for partial pulls can be pushed with:

$ buildah push --compression-format zstd:chunked FOO

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
@giuseppe giuseppe force-pushed the support-compression-format-level branch from 7fa21cf to 1cc85e7 Compare September 22, 2021 21:13
@nalind
Copy link
Member

nalind commented Sep 22, 2021

LGTM

Copy link
Member

@vrothberg vrothberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm
/hold

Restarted flaked test (handshake timeout)

@rhatdan
Copy link
Member

rhatdan commented Sep 23, 2021

/hold cancel

@openshift-merge-robot openshift-merge-robot merged commit 9a49348 into containers:main Sep 23, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 15, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants