diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2021-06-25 12:45:53 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-25 12:45:53 -0400 |
commit | 0a0ade3cc00c3779bbf68ddd103d3efd10b5c25b (patch) | |
tree | 7a14316df448918e2e54dce77cade7b5cac381b3 /cmd/podman | |
parent | b4767817012a3aedaf05dc7a32bd823fcd3776f4 (diff) | |
parent | e7507fe7cf2f35e332f58ae632882f29395e4c59 (diff) | |
download | podman-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.go | 8 |
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") |