summaryrefslogtreecommitdiff
path: root/pkg/domain/infra/abi/play.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-11-17 22:40:28 +0100
committerGitHub <noreply@github.com>2020-11-17 22:40:28 +0100
commit770b03a50cbffbf1ad1d40a8c9ea72860727acea (patch)
treea9f3704b068fc111ed51c9aeadd7b5392c11432e /pkg/domain/infra/abi/play.go
parent0886fabbc233261008cc38ee07dea238bcf4de86 (diff)
parent7ab936eafad504fd6a0b7bfec3f6dafe322ad09d (diff)
downloadpodman-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 'pkg/domain/infra/abi/play.go')
-rw-r--r--pkg/domain/infra/abi/play.go26
1 files changed, 14 insertions, 12 deletions
diff --git a/pkg/domain/infra/abi/play.go b/pkg/domain/infra/abi/play.go
index c0948e099..4bcc6469c 100644
--- a/pkg/domain/infra/abi/play.go
+++ b/pkg/domain/infra/abi/play.go
@@ -297,20 +297,22 @@ func (ic *ContainerEngine) playKubePod(ctx context.Context, podName string, podY
containers = append(containers, ctr)
}
- //start the containers
- podStartErrors, err := pod.Start(ctx)
- if err != nil {
- return nil, err
- }
+ if options.Start != types.OptionalBoolFalse {
+ //start the containers
+ podStartErrors, err := pod.Start(ctx)
+ if err != nil {
+ return nil, err
+ }
- // Previous versions of playkube started containers individually and then
- // looked for errors. Because we now use the uber-Pod start call, we should
- // iterate the map of possible errors and return one if there is a problem. This
- // keeps the behavior the same
+ // Previous versions of playkube started containers individually and then
+ // looked for errors. Because we now use the uber-Pod start call, we should
+ // iterate the map of possible errors and return one if there is a problem. This
+ // keeps the behavior the same
- for _, e := range podStartErrors {
- if e != nil {
- return nil, e
+ for _, e := range podStartErrors {
+ if e != nil {
+ return nil, e
+ }
}
}