summaryrefslogtreecommitdiff
path: root/cmd
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 /cmd
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 'cmd')
-rw-r--r--cmd/podman/secrets/create.go8
1 files changed, 7 insertions, 1 deletions
diff --git a/cmd/podman/secrets/create.go b/cmd/podman/secrets/create.go
index f5739e99a..8c268615c 100644
--- a/cmd/podman/secrets/create.go
+++ b/cmd/podman/secrets/create.go
@@ -42,8 +42,14 @@ func init() {
flags := createCmd.Flags()
driverFlagName := "driver"
- flags.StringVar(&createOpts.Driver, driverFlagName, "file", "Specify secret driver")
+ optsFlagName := "driver-opts"
+
+ cfg := registry.PodmanConfig()
+
+ flags.StringVar(&createOpts.Driver, driverFlagName, cfg.Secrets.Driver, "Specify secret driver")
+ flags.StringToStringVar(&createOpts.Opts, optsFlagName, cfg.Secrets.Opts, "Specify driver specific options")
_ = createCmd.RegisterFlagCompletionFunc(driverFlagName, completion.AutocompleteNone)
+ _ = createCmd.RegisterFlagCompletionFunc(optsFlagName, completion.AutocompleteNone)
envFlagName := "env"
flags.BoolVar(&env, envFlagName, false, "Read secret data from environment variable")