aboutsummaryrefslogtreecommitdiff
path: root/cmd/podman
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2021-06-25 12:45:53 -0400
committerGitHub <noreply@github.com>2021-06-25 12:45:53 -0400
commit0a0ade3cc00c3779bbf68ddd103d3efd10b5c25b (patch)
tree7a14316df448918e2e54dce77cade7b5cac381b3 /cmd/podman
parentb4767817012a3aedaf05dc7a32bd823fcd3776f4 (diff)
parente7507fe7cf2f35e332f58ae632882f29395e4c59 (diff)
downloadpodman-0a0ade3cc00c3779bbf68ddd103d3efd10b5c25b.tar.gz
podman-0a0ade3cc00c3779bbf68ddd103d3efd10b5c25b.tar.bz2
podman-0a0ade3cc00c3779bbf68ddd103d3efd10b5c25b.zip
Merge pull request #10736 from trusch/feature-use-secret-config
read secret config from config file if no user data.
Diffstat (limited to 'cmd/podman')
-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..f9846f9fb 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.DriverOpts, 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")