aboutsummaryrefslogtreecommitdiff
path: root/pkg/domain/infra
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2022-07-20 19:37:25 +0200
committerGitHub <noreply@github.com>2022-07-20 19:37:25 +0200
commitabfdd4b00cdd754c8b0745fa0921d12796029586 (patch)
tree4293206b8c19d1f63d76f1dcc6812e074437bf94 /pkg/domain/infra
parent8c9eff5b12eebe318be1f905562be6a236285caa (diff)
parentda33f100551ebd9b5e8790d677a1a8be2ea4fae4 (diff)
downloadpodman-abfdd4b00cdd754c8b0745fa0921d12796029586.tar.gz
podman-abfdd4b00cdd754c8b0745fa0921d12796029586.tar.bz2
podman-abfdd4b00cdd754c8b0745fa0921d12796029586.zip
Merge pull request #14977 from umohnani8/init
Update init ctr default for play kube
Diffstat (limited to 'pkg/domain/infra')
-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,