aboutsummaryrefslogtreecommitdiff
path: root/pkg
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2021-12-03 19:20:45 +0100
committerGitHub <noreply@github.com>2021-12-03 19:20:45 +0100
commita93fa5e0c95deb9c7ea8a1df3fa2e5b89efb89df (patch)
treeec2962093c30236467477075683ae41289892b46 /pkg
parenta50502dd3d8ef5c80d686824ba2023927825fd2c (diff)
parent4e63f9192dcdd4ee77732c320b237e9421072a73 (diff)
downloadpodman-a93fa5e0c95deb9c7ea8a1df3fa2e5b89efb89df.tar.gz
podman-a93fa5e0c95deb9c7ea8a1df3fa2e5b89efb89df.tar.bz2
podman-a93fa5e0c95deb9c7ea8a1df3fa2e5b89efb89df.zip
Merge pull request #12466 from dispensable/respect_pod_yaml_spec_hostname_when_play
Hostname in `spec.hostname` should be passed to infra ctr init opt
Diffstat (limited to 'pkg')
-rw-r--r--pkg/domain/infra/abi/play.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/pkg/domain/infra/abi/play.go b/pkg/domain/infra/abi/play.go
index ab52fad64..4c024a3d8 100644
--- a/pkg/domain/infra/abi/play.go
+++ b/pkg/domain/infra/abi/play.go
@@ -316,6 +316,7 @@ func (ic *ContainerEngine) playKubePod(ctx context.Context, podName string, podY
if podOpt.Infra {
infraImage := util.DefaultContainerConfig().Engine.InfraImage
infraOptions := entities.NewInfraContainerCreateOptions()
+ infraOptions.Hostname = podSpec.PodSpecGen.PodBasicConfig.Hostname
podSpec.PodSpecGen.InfraImage = infraImage
podSpec.PodSpecGen.NoInfra = false
podSpec.PodSpecGen.InfraContainerSpec = specgen.NewSpecGenerator(infraImage, false)