diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2022-07-20 19:37:25 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-20 19:37:25 +0200 |
commit | abfdd4b00cdd754c8b0745fa0921d12796029586 (patch) | |
tree | 4293206b8c19d1f63d76f1dcc6812e074437bf94 /pkg/domain/infra/abi | |
parent | 8c9eff5b12eebe318be1f905562be6a236285caa (diff) | |
parent | da33f100551ebd9b5e8790d677a1a8be2ea4fae4 (diff) | |
download | podman-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/abi')
-rw-r--r-- | pkg/domain/infra/abi/play.go | 6 |
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, |