Commit 019efef8 authored by Thomas Liu's avatar Thomas Liu Committed by tyangliu

Pass dockerOpts by reference to setInfraContainerNetworkConfig

parent 66005063
......@@ -656,7 +656,7 @@ func (dm *DockerManager) runContainer(
// Set network configuration for infra-container
if container.Name == PodInfraContainerName {
setInfraContainerNetworkConfig(pod, netMode, opts, dockerOpts)
setInfraContainerNetworkConfig(pod, netMode, opts, &dockerOpts)
}
setEntrypointAndCommand(container, opts, dockerOpts)
......@@ -688,7 +688,7 @@ func (dm *DockerManager) runContainer(
// setInfraContainerNetworkConfig sets the network configuration for the infra-container. We only set network configuration for infra-container, all
// the user containers will share the same network namespace with infra-container.
func setInfraContainerNetworkConfig(pod *api.Pod, netMode string, opts *kubecontainer.RunContainerOptions, dockerOpts dockertypes.ContainerCreateConfig) {
func setInfraContainerNetworkConfig(pod *api.Pod, netMode string, opts *kubecontainer.RunContainerOptions, dockerOpts *dockertypes.ContainerCreateConfig) {
exposedPorts, portBindings := makePortsAndBindings(opts.PortMappings)
dockerOpts.Config.ExposedPorts = exposedPorts
dockerOpts.HostConfig.PortBindings = dockernat.PortMap(portBindings)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment