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
e43f6057
Commit
e43f6057
authored
Sep 09, 2016
by
Kubernetes Submit Queue
Committed by
GitHub
Sep 09, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #32413 from freehan/hostportfix
Automatic merge from submit-queue Fix a bug in kubelet hostport logic which flushes KUBE-MARK-MASQ iptables chain Fixes #32415
parents
f5077ff8
118ebd57
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
8 deletions
+1
-8
hostport.go
pkg/kubelet/network/hostport/hostport.go
+1
-8
No files found.
pkg/kubelet/network/hostport/hostport.go
View file @
e43f6057
...
...
@@ -251,14 +251,6 @@ func (h *handler) SyncHostports(natInterfaceName string, runningPods []*RunningP
}
else
{
writeLine
(
natChains
,
utiliptables
.
MakeChainLine
(
kubeHostportsChain
))
}
// Assuming the node is running kube-proxy in iptables mode
// Reusing kube-proxy's KubeMarkMasqChain for SNAT
// TODO: let kubelet manage KubeMarkMasqChain. Other components should just be able to use it
if
chain
,
ok
:=
existingNATChains
[
iptablesproxy
.
KubeMarkMasqChain
];
ok
{
writeLine
(
natChains
,
chain
)
}
else
{
writeLine
(
natChains
,
utiliptables
.
MakeChainLine
(
iptablesproxy
.
KubeMarkMasqChain
))
}
// Accumulate NAT chains to keep.
activeNATChains
:=
map
[
utiliptables
.
Chain
]
bool
{}
// use a map as a set
...
...
@@ -284,6 +276,7 @@ func (h *handler) SyncHostports(natInterfaceName string, runningPods []*RunningP
}
writeLine
(
natRules
,
args
...
)
// Assuming kubelet is syncing iptables KUBE-MARK-MASQ chain
// If the request comes from the pod that is serving the hostport, then SNAT
args
=
[]
string
{
"-A"
,
string
(
hostportChain
),
...
...
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