summaryrefslogtreecommitdiff
path: root/pkg/domain/infra/abi/play.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2022-07-27 12:02:25 -0400
committerGitHub <noreply@github.com>2022-07-27 12:02:25 -0400
commit87f892e5b56c2fab2f394f8cc79794ccce03f510 (patch)
tree1ba831a9dddfb6927698bcb9e0c2bee913ad0dcb /pkg/domain/infra/abi/play.go
parentc57b5c9b831695f8c54d11b4f288d6037c096fea (diff)
parent983cfb90e68d7b292b0f6ee8800c3f23383493cc (diff)
downloadpodman-87f892e5b56c2fab2f394f8cc79794ccce03f510.tar.gz
podman-87f892e5b56c2fab2f394f8cc79794ccce03f510.tar.bz2
podman-87f892e5b56c2fab2f394f8cc79794ccce03f510.zip
Merge pull request #15076 from mheon/bump_420_rc2
Bump to v4.2.0-RC2
Diffstat (limited to 'pkg/domain/infra/abi/play.go')
-rw-r--r--pkg/domain/infra/abi/play.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/pkg/domain/infra/abi/play.go b/pkg/domain/infra/abi/play.go
index c913fdb69..8b47eff53 100644
--- a/pkg/domain/infra/abi/play.go
+++ b/pkg/domain/infra/abi/play.go
@@ -507,13 +507,17 @@ func (ic *ContainerEngine) playKubePod(ctx context.Context, podName string, podY
for k, v := range podSpec.PodSpecGen.Labels { // add podYAML labels
labels[k] = v
}
+ initCtrType := annotations[define.InitContainerType]
+ if initCtrType == "" {
+ initCtrType = define.OneShotInitContainer
+ }
specgenOpts := kube.CtrSpecGenOptions{
Annotations: annotations,
ConfigMaps: configMaps,
Container: initCtr,
Image: pulledImage,
- InitContainerType: define.AlwaysInitContainer,
+ InitContainerType: initCtrType,
Labels: labels,
LogDriver: options.LogDriver,
LogOptions: options.LogOptions,