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
805a0aae
Commit
805a0aae
authored
Jun 09, 2016
by
k8s-merge-robot
Committed by
GitHub
Jun 09, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #27141 from freehan/hpfix
Automatic merge from submit-queue only handled non host network pods for hostports in kubenet attempt to fix: #27118
parents
1cfa84c1
1b2386f1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
kubenet_linux.go
pkg/kubelet/network/kubenet/kubenet_linux.go
+2
-1
No files found.
pkg/kubelet/network/kubenet/kubenet_linux.go
View file @
805a0aae
...
@@ -613,7 +613,8 @@ func (plugin *kubenetNetworkPlugin) gatherAllHostports() (map[api.ContainerPort]
...
@@ -613,7 +613,8 @@ func (plugin *kubenetNetworkPlugin) gatherAllHostports() (map[api.ContainerPort]
}
}
// Need the complete api.Pod object
// Need the complete api.Pod object
pod
,
ok
:=
plugin
.
host
.
GetPodByName
(
p
.
Namespace
,
p
.
Name
)
pod
,
ok
:=
plugin
.
host
.
GetPodByName
(
p
.
Namespace
,
p
.
Name
)
if
ok
{
// kubenet should not handle hostports for hostnetwork pods
if
ok
&&
!
pod
.
Spec
.
SecurityContext
.
HostNetwork
{
for
_
,
container
:=
range
pod
.
Spec
.
Containers
{
for
_
,
container
:=
range
pod
.
Spec
.
Containers
{
for
_
,
port
:=
range
container
.
Ports
{
for
_
,
port
:=
range
container
.
Ports
{
if
port
.
HostPort
!=
0
{
if
port
.
HostPort
!=
0
{
...
...
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