Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pass dockerOpts by reference to setInfraContainerNetworkConfig #24080

Merged
merged 1 commit into from
May 13, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions pkg/kubelet/dockertools/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down