aboutsummaryrefslogtreecommitdiff
path: root/pkg/api
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2022-08-01 09:50:52 +0200
committerGitHub <noreply@github.com>2022-08-01 09:50:52 +0200
commitf5f7909932dc314612539dabf8682b17c6e20970 (patch)
treec91259ed7763a34093cbb19ff03cce5ed15d8479 /pkg/api
parentfed326d8a6f8d4f7dc490099b29d51fc1754789f (diff)
parent24a599fe1d8f7f9da23cf3056c4eda8bcc89e563 (diff)
downloadpodman-f5f7909932dc314612539dabf8682b17c6e20970.tar.gz
podman-f5f7909932dc314612539dabf8682b17c6e20970.tar.bz2
podman-f5f7909932dc314612539dabf8682b17c6e20970.zip
Merge pull request #15125 from Romain-Geissler-1A/fix-manifest-push
[Closes 15109] Add flag "--compression-format" to "podman manifest push" (and other fixes)
Diffstat (limited to 'pkg/api')
-rw-r--r--pkg/api/handlers/libpod/images_push.go28
-rw-r--r--pkg/api/handlers/libpod/manifests.go18
2 files changed, 27 insertions, 19 deletions
diff --git a/pkg/api/handlers/libpod/images_push.go b/pkg/api/handlers/libpod/images_push.go
index 9ee651f5b..e931fd2f9 100644
--- a/pkg/api/handlers/libpod/images_push.go
+++ b/pkg/api/handlers/libpod/images_push.go
@@ -25,12 +25,13 @@ func PushImage(w http.ResponseWriter, r *http.Request) {
runtime := r.Context().Value(api.RuntimeKey).(*libpod.Runtime)
query := struct {
- All bool `schema:"all"`
- Destination string `schema:"destination"`
- Format string `schema:"format"`
- RemoveSignatures bool `schema:"removeSignatures"`
- TLSVerify bool `schema:"tlsVerify"`
- Quiet bool `schema:"quiet"`
+ All bool `schema:"all"`
+ CompressionFormat string `schema:"compressionFormat"`
+ Destination string `schema:"destination"`
+ Format string `schema:"format"`
+ RemoveSignatures bool `schema:"removeSignatures"`
+ TLSVerify bool `schema:"tlsVerify"`
+ Quiet bool `schema:"quiet"`
}{
TLSVerify: true,
// #14971: older versions did not sent *any* data, so we need
@@ -71,13 +72,14 @@ func PushImage(w http.ResponseWriter, r *http.Request) {
password = authconf.Password
}
options := entities.ImagePushOptions{
- All: query.All,
- Authfile: authfile,
- Format: query.Format,
- Password: password,
- Quiet: true,
- RemoveSignatures: query.RemoveSignatures,
- Username: username,
+ All: query.All,
+ Authfile: authfile,
+ CompressionFormat: query.CompressionFormat,
+ Format: query.Format,
+ Password: password,
+ Quiet: true,
+ RemoveSignatures: query.RemoveSignatures,
+ Username: username,
}
if _, found := r.URL.Query()["tlsVerify"]; found {
diff --git a/pkg/api/handlers/libpod/manifests.go b/pkg/api/handlers/libpod/manifests.go
index 43c7139d3..2d6223e4e 100644
--- a/pkg/api/handlers/libpod/manifests.go
+++ b/pkg/api/handlers/libpod/manifests.go
@@ -306,8 +306,11 @@ func ManifestPush(w http.ResponseWriter, r *http.Request) {
decoder := r.Context().Value(api.DecoderKey).(*schema.Decoder)
query := struct {
- All bool `schema:"all"`
- TLSVerify bool `schema:"tlsVerify"`
+ All bool `schema:"all"`
+ CompressionFormat string `schema:"compressionFormat"`
+ Format string `schema:"format"`
+ RemoveSignatures bool `schema:"removeSignatures"`
+ TLSVerify bool `schema:"tlsVerify"`
}{
// Add defaults here once needed.
TLSVerify: true,
@@ -336,10 +339,13 @@ func ManifestPush(w http.ResponseWriter, r *http.Request) {
password = authconf.Password
}
options := entities.ImagePushOptions{
- Authfile: authfile,
- Username: username,
- Password: password,
- All: query.All,
+ All: query.All,
+ Authfile: authfile,
+ CompressionFormat: query.CompressionFormat,
+ Format: query.Format,
+ Password: password,
+ RemoveSignatures: query.RemoveSignatures,
+ Username: username,
}
if sys := runtime.SystemContext(); sys != nil {
options.CertDir = sys.DockerCertPath