summaryrefslogtreecommitdiff
path: root/pkg/domain/infra
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2022-09-29 13:22:22 +0200
committerGitHub <noreply@github.com>2022-09-29 13:22:22 +0200
commitf52feded3ce6c1ad2af046ab774fbc2b9c832487 (patch)
tree227b374d8677368691ac48bab7603771ffecc540 /pkg/domain/infra
parent3269ee9fea1bab7735a3668db9e6631b4fa933b9 (diff)
parent32f54a81ed797597827123b671b6e73194354327 (diff)
downloadpodman-f52feded3ce6c1ad2af046ab774fbc2b9c832487.tar.gz
podman-f52feded3ce6c1ad2af046ab774fbc2b9c832487.tar.bz2
podman-f52feded3ce6c1ad2af046ab774fbc2b9c832487.zip
Merge pull request #15988 from sstosh/manifest-annotate-remote
remote: fix manifest add --annotation
Diffstat (limited to 'pkg/domain/infra')
-rw-r--r--pkg/domain/infra/tunnel/manifest.go18
1 files changed, 3 insertions, 15 deletions
diff --git a/pkg/domain/infra/tunnel/manifest.go b/pkg/domain/infra/tunnel/manifest.go
index 696d0a963..2fe43aad0 100644
--- a/pkg/domain/infra/tunnel/manifest.go
+++ b/pkg/domain/infra/tunnel/manifest.go
@@ -5,7 +5,6 @@ import (
"encoding/json"
"errors"
"fmt"
- "strings"
"github.com/containers/image/v5/types"
"github.com/containers/podman/v4/pkg/bindings/images"
@@ -48,20 +47,9 @@ func (ir *ImageEngine) ManifestInspect(_ context.Context, name string) ([]byte,
// ManifestAdd adds images to the manifest list
func (ir *ImageEngine) ManifestAdd(_ context.Context, name string, imageNames []string, opts entities.ManifestAddOptions) (string, error) {
- options := new(manifests.AddOptions).WithAll(opts.All).WithArch(opts.Arch).WithVariant(opts.Variant)
- options.WithFeatures(opts.Features).WithImages(imageNames).WithOS(opts.OS).WithOSVersion(opts.OSVersion)
- options.WithUsername(opts.Username).WithPassword(opts.Password).WithAuthfile(opts.Authfile)
- if len(opts.Annotation) != 0 {
- annotations := make(map[string]string)
- for _, annotationSpec := range opts.Annotation {
- spec := strings.SplitN(annotationSpec, "=", 2)
- if len(spec) != 2 {
- return "", fmt.Errorf("no value given for annotation %q", spec[0])
- }
- annotations[spec[0]] = spec[1]
- }
- options.WithAnnotation(annotations)
- }
+ options := new(manifests.AddOptions).WithAll(opts.All).WithAnnotation(opts.Annotation).WithArch(opts.Arch)
+ options.WithVariant(opts.Variant).WithFeatures(opts.Features).WithImages(imageNames).WithOS(opts.OS)
+ options.WithOSVersion(opts.OSVersion).WithUsername(opts.Username).WithPassword(opts.Password).WithAuthfile(opts.Authfile)
if s := opts.SkipTLSVerify; s != types.OptionalBoolUndefined {
if s == types.OptionalBoolTrue {
options.WithSkipTLSVerify(true)