diff options
author | Daniel J Walsh <dwalsh@redhat.com> | 2022-06-10 07:04:32 -0400 |
---|---|---|
committer | Daniel J Walsh <dwalsh@redhat.com> | 2022-06-10 07:14:12 -0400 |
commit | 48cf1d258326b25308225cb4a22703d6e3416b18 (patch) | |
tree | a030f23fc4424631ee49fabd18446a38a07d15a9 /pkg/bindings | |
parent | 9f1bd0a0a1494f46a49ca7f22511c5a78006afd8 (diff) | |
download | podman-48cf1d258326b25308225cb4a22703d6e3416b18.tar.gz podman-48cf1d258326b25308225cb4a22703d6e3416b18.tar.bz2 podman-48cf1d258326b25308225cb4a22703d6e3416b18.zip |
podman-remote push --remove-signatures support
I don't see a reason why we don't support --remove-signatures
from remote push, so adding support.
Fixes: https://github.com/containers/podman/issues/14558
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Diffstat (limited to 'pkg/bindings')
-rw-r--r-- | pkg/bindings/images/types.go | 2 | ||||
-rw-r--r-- | pkg/bindings/images/types_push_options.go | 15 |
2 files changed, 17 insertions, 0 deletions
diff --git a/pkg/bindings/images/types.go b/pkg/bindings/images/types.go index 8e5e7ee92..16dbad380 100644 --- a/pkg/bindings/images/types.go +++ b/pkg/bindings/images/types.go @@ -127,6 +127,8 @@ type PushOptions struct { Password *string // SkipTLSVerify to skip HTTPS and certificate verification. SkipTLSVerify *bool + // RemoveSignatures Discard any pre-existing signatures in the image. + RemoveSignatures *bool // Username for authenticating against the registry. Username *string } diff --git a/pkg/bindings/images/types_push_options.go b/pkg/bindings/images/types_push_options.go index 4985c9451..25f6c5546 100644 --- a/pkg/bindings/images/types_push_options.go +++ b/pkg/bindings/images/types_push_options.go @@ -107,6 +107,21 @@ func (o *PushOptions) GetSkipTLSVerify() bool { return *o.SkipTLSVerify } +// WithRemoveSignatures set field RemoveSignatures to given value +func (o *PushOptions) WithRemoveSignatures(value bool) *PushOptions { + o.RemoveSignatures = &value + return o +} + +// GetRemoveSignatures returns value of field RemoveSignatures +func (o *PushOptions) GetRemoveSignatures() bool { + if o.RemoveSignatures == nil { + var z bool + return z + } + return *o.RemoveSignatures +} + // WithUsername set field Username to given value func (o *PushOptions) WithUsername(value string) *PushOptions { o.Username = &value |