summaryrefslogtreecommitdiff
path: root/pkg/domain/infra/tunnel/secrets.go
diff options
context:
space:
mode:
authorTino Rusch <tino.rusch@gmail.com>2021-06-20 16:11:54 +0200
committerTino Rusch <tino.rusch@gmail.com>2021-06-24 12:31:14 +0200
commitb56b4b53744c59cad942278ff34a0b0616a7aa60 (patch)
tree77bb7ead8c1f2ccedc31eaa5dc1cc06483555947 /pkg/domain/infra/tunnel/secrets.go
parentda33fc45b6628c1ac1a16e49790be2b4fbf502a5 (diff)
downloadpodman-b56b4b53744c59cad942278ff34a0b0616a7aa60.tar.gz
podman-b56b4b53744c59cad942278ff34a0b0616a7aa60.tar.bz2
podman-b56b4b53744c59cad942278ff34a0b0616a7aa60.zip
read secret config from config file if no user data.
feat: read secret config from config file if the user hasn't entered explicit config values feat: allow to specify `--driver-opts opt1=val1,opt2=val2` in the secret create command to allow overriding the default values fix: show driver options in `podman secret inspect` Signed-off-by: Tino Rusch <tino.rusch@gmail.com>
Diffstat (limited to 'pkg/domain/infra/tunnel/secrets.go')
-rw-r--r--pkg/domain/infra/tunnel/secrets.go10
1 files changed, 8 insertions, 2 deletions
diff --git a/pkg/domain/infra/tunnel/secrets.go b/pkg/domain/infra/tunnel/secrets.go
index 1153f490e..8cdc220a4 100644
--- a/pkg/domain/infra/tunnel/secrets.go
+++ b/pkg/domain/infra/tunnel/secrets.go
@@ -11,8 +11,14 @@ import (
)
func (ic *ContainerEngine) SecretCreate(ctx context.Context, name string, reader io.Reader, options entities.SecretCreateOptions) (*entities.SecretCreateReport, error) {
- opts := new(secrets.CreateOptions).WithDriver(options.Driver).WithName(name)
- created, _ := secrets.Create(ic.ClientCtx, reader, opts)
+ opts := new(secrets.CreateOptions).
+ WithDriver(options.Driver).
+ WithDriverOpts(options.Opts).
+ WithName(name)
+ created, err := secrets.Create(ic.ClientCtx, reader, opts)
+ if err != nil {
+ return nil, err
+ }
return created, nil
}