mirror of
https://github.com/containers/podman.git
synced 2025-06-30 15:49:03 +08:00
handle play kube with pod.spec.hostAliases
Signed-off-by: zhangguanzhang <zhangguanzhang@qq.com>
This commit is contained in:
@ -267,6 +267,16 @@ func (c *CreateConfig) getContainerCreateOptions(runtime *libpod.Runtime, pod *l
|
||||
options = append(options, runtime.WithPod(pod))
|
||||
}
|
||||
|
||||
// handle some spec from the InfraContainer when it's a pod
|
||||
if pod != nil && pod.HasInfraContainer() {
|
||||
InfraCtr, err := pod.InfraContainer()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
// handle the pod.spec.hostAliases
|
||||
options = append(options, libpod.WithHosts(InfraCtr.HostsAdd()))
|
||||
}
|
||||
|
||||
if len(mounts) != 0 || len(namedVolumes) != 0 {
|
||||
destinations := []string{}
|
||||
|
||||
|
Reference in New Issue
Block a user