From 865612c3db6a0835636154c498e3695976599455 Mon Sep 17 00:00:00 2001 From: Ryan Cole Date: Mon, 7 Aug 2017 13:43:50 -0400 Subject: [PATCH 1/2] Disable compression by default Signed-off-by: Ryan Cole --- cmd/kpod/push.go | 11 ++--------- test/kpod.bats | 2 +- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/cmd/kpod/push.go b/cmd/kpod/push.go index 43ab18e3..4621078e 100644 --- a/cmd/kpod/push.go +++ b/cmd/kpod/push.go @@ -15,11 +15,6 @@ import ( var ( pushFlags = []cli.Flag{ - cli.BoolFlag{ - Name: "disable-compression, D", - Usage: "don't compress layers", - Hidden: true, - }, cli.StringFlag{ Name: "signature-policy", Usage: "`pathname` of signature policy file (not usually used)", @@ -76,15 +71,13 @@ func pushCmd(c *cli.Context) error { destName := c.Args().Get(1) signaturePolicy := c.String("signature-policy") - compress := archive.Uncompressed - if !c.Bool("disable-compression") { - compress = archive.Gzip - } registryCredsString := c.String("creds") certPath := c.String("cert-dir") skipVerify := !c.BoolT("tls-verify") removeSignatures := c.Bool("remove-signatures") signBy := c.String("sign-by") + // Leave this here in case we want to add a compression option in the future + compress := archive.Uncompressed if registryCredsString != "" { creds, err := common.ParseRegistryCreds(registryCredsString) diff --git a/test/kpod.bats b/test/kpod.bats index b851cf24..6e5d4342 100644 --- a/test/kpod.bats +++ b/test/kpod.bats @@ -169,7 +169,7 @@ function teardown() { run mkdir /tmp/oci-busybox echo "$output" [ "$status" -eq 0 ] - run ${KPOD_BINARY} $KPOD_OPTIONS push --disable-compression "$IMAGE" oci:/tmp/oci-busybox + run ${KPOD_BINARY} $KPOD_OPTIONS push "$IMAGE" oci:/tmp/oci-busybox echo "$output" [ "$status" -eq 0 ] run rm -rf /tmp/oci-busybox From e48f7a3491f705fdcd78e84f58d23b0e6e9fea93 Mon Sep 17 00:00:00 2001 From: Daniel J Walsh Date: Sun, 27 Aug 2017 11:10:32 +0000 Subject: [PATCH 2/2] Remove compress variable No reason to carry this temporary variable for documentation purposes. If in the future we find that it is necessary to add a CLI option, we can add the variable then. Signed-off-by: Daniel J Walsh --- cmd/kpod/push.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/cmd/kpod/push.go b/cmd/kpod/push.go index 4621078e..2091a872 100644 --- a/cmd/kpod/push.go +++ b/cmd/kpod/push.go @@ -76,8 +76,6 @@ func pushCmd(c *cli.Context) error { skipVerify := !c.BoolT("tls-verify") removeSignatures := c.Bool("remove-signatures") signBy := c.String("sign-by") - // Leave this here in case we want to add a compression option in the future - compress := archive.Uncompressed if registryCredsString != "" { creds, err := common.ParseRegistryCreds(registryCredsString) @@ -106,7 +104,7 @@ func pushCmd(c *cli.Context) error { } options := libkpodimage.CopyOptions{ - Compression: compress, + Compression: archive.Uncompressed, SignaturePolicyPath: signaturePolicy, Store: store, DockerRegistryOptions: common.DockerRegistryOptions{