Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
019efef8
Commit
019efef8
authored
Apr 09, 2016
by
Thomas Liu
Committed by
tyangliu
May 07, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Pass dockerOpts by reference to setInfraContainerNetworkConfig
parent
66005063
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
manager.go
pkg/kubelet/dockertools/manager.go
+2
-2
No files found.
pkg/kubelet/dockertools/manager.go
View file @
019efef8
...
@@ -656,7 +656,7 @@ func (dm *DockerManager) runContainer(
...
@@ -656,7 +656,7 @@ func (dm *DockerManager) runContainer(
// Set network configuration for infra-container
// Set network configuration for infra-container
if
container
.
Name
==
PodInfraContainerName
{
if
container
.
Name
==
PodInfraContainerName
{
setInfraContainerNetworkConfig
(
pod
,
netMode
,
opts
,
dockerOpts
)
setInfraContainerNetworkConfig
(
pod
,
netMode
,
opts
,
&
dockerOpts
)
}
}
setEntrypointAndCommand
(
container
,
opts
,
dockerOpts
)
setEntrypointAndCommand
(
container
,
opts
,
dockerOpts
)
...
@@ -688,7 +688,7 @@ func (dm *DockerManager) runContainer(
...
@@ -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
// 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.
// 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
)
exposedPorts
,
portBindings
:=
makePortsAndBindings
(
opts
.
PortMappings
)
dockerOpts
.
Config
.
ExposedPorts
=
exposedPorts
dockerOpts
.
Config
.
ExposedPorts
=
exposedPorts
dockerOpts
.
HostConfig
.
PortBindings
=
dockernat
.
PortMap
(
portBindings
)
dockerOpts
.
HostConfig
.
PortBindings
=
dockernat
.
PortMap
(
portBindings
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment