summaryrefslogtreecommitdiff
path: root/pkg/bindings/play
diff options
context:
space:
mode:
authorAlban Bedel <albeu@free.fr>2020-11-16 21:46:42 +0100
committerAlban Bedel <albeu@free.fr>2020-11-17 20:00:58 +0100
commit7ab936eafad504fd6a0b7bfec3f6dafe322ad09d (patch)
tree5ccf2a4f68bd59f089d2e34f62e240a140b2b9a3 /pkg/bindings/play
parent12de330094fdcd2e2fd0d10d5e5ddd962193de8b (diff)
downloadpodman-7ab936eafad504fd6a0b7bfec3f6dafe322ad09d.tar.gz
podman-7ab936eafad504fd6a0b7bfec3f6dafe322ad09d.tar.bz2
podman-7ab936eafad504fd6a0b7bfec3f6dafe322ad09d.zip
Add an option to control if play kube should start the pod
Having play kube start the pod is not always appropriate, one might for example like to have the pod running as a set of systemd services. Add a `start` option to the command line and API to control if the pod should be started or not; it defaults to true for backward compatibility. Signed-off-by: Alban Bedel <albeu@free.fr>
Diffstat (limited to 'pkg/bindings/play')
-rw-r--r--pkg/bindings/play/play.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/pkg/bindings/play/play.go b/pkg/bindings/play/play.go
index 8af3b8fb1..3861ba87d 100644
--- a/pkg/bindings/play/play.go
+++ b/pkg/bindings/play/play.go
@@ -32,6 +32,9 @@ func Kube(ctx context.Context, path string, options entities.PlayKubeOptions) (*
if options.SkipTLSVerify != types.OptionalBoolUndefined {
params.Set("tlsVerify", strconv.FormatBool(options.SkipTLSVerify == types.OptionalBoolTrue))
}
+ if options.Start != types.OptionalBoolUndefined {
+ params.Set("start", strconv.FormatBool(options.Start == types.OptionalBoolTrue))
+ }
// TODO: have a global system context we can pass around (1st argument)
header, err := auth.Header(nil, auth.XRegistryAuthHeader, options.Authfile, options.Username, options.Password)