diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2020-11-17 22:40:28 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-17 22:40:28 +0100 |
commit | 770b03a50cbffbf1ad1d40a8c9ea72860727acea (patch) | |
tree | a9f3704b068fc111ed51c9aeadd7b5392c11432e /cmd/podman | |
parent | 0886fabbc233261008cc38ee07dea238bcf4de86 (diff) | |
parent | 7ab936eafad504fd6a0b7bfec3f6dafe322ad09d (diff) | |
download | podman-770b03a50cbffbf1ad1d40a8c9ea72860727acea.tar.gz podman-770b03a50cbffbf1ad1d40a8c9ea72860727acea.tar.bz2 podman-770b03a50cbffbf1ad1d40a8c9ea72860727acea.zip |
Merge pull request #8363 from AlbanBedel/play-kube-create-only
Add an option to control if play kube should start the pod
Diffstat (limited to 'cmd/podman')
-rw-r--r-- | cmd/podman/play/kube.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/cmd/podman/play/kube.go b/cmd/podman/play/kube.go index a9e91bd68..db70ad7d4 100644 --- a/cmd/podman/play/kube.go +++ b/cmd/podman/play/kube.go @@ -22,6 +22,7 @@ type playKubeOptionsWrapper struct { TLSVerifyCLI bool CredentialsCLI string + StartCLI bool } var ( @@ -68,6 +69,7 @@ func init() { flags.BoolVarP(&kubeOptions.Quiet, "quiet", "q", false, "Suppress output information when pulling images") flags.BoolVar(&kubeOptions.TLSVerifyCLI, "tls-verify", true, "Require HTTPS and verify certificates when contacting registries") + flags.BoolVar(&kubeOptions.StartCLI, "start", true, "Start the pod after creating it") authfileFlagName := "authfile" flags.StringVar(&kubeOptions.Authfile, authfileFlagName, auth.GetDefaultAuthFile(), "Path of the authentication file. Use REGISTRY_AUTH_FILE environment variable to override") @@ -100,6 +102,9 @@ func kube(cmd *cobra.Command, args []string) error { if cmd.Flags().Changed("tls-verify") { kubeOptions.SkipTLSVerify = types.NewOptionalBool(!kubeOptions.TLSVerifyCLI) } + if cmd.Flags().Changed("start") { + kubeOptions.Start = types.NewOptionalBool(kubeOptions.StartCLI) + } if kubeOptions.Authfile != "" { if _, err := os.Stat(kubeOptions.Authfile); err != nil { return err |