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
ce830978
Commit
ce830978
authored
May 31, 2017
by
Tim Hockin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Proxy: comments around ClusterCIDR use
parent
862b1654
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
3 deletions
+7
-3
proxier.go
pkg/proxy/iptables/proxier.go
+7
-3
No files found.
pkg/proxy/iptables/proxier.go
View file @
ce830978
...
@@ -1175,8 +1175,12 @@ func (proxier *Proxier) syncProxyRules() {
...
@@ -1175,8 +1175,12 @@ func (proxier *Proxier) syncProxyRules() {
)
)
if
proxier
.
masqueradeAll
{
if
proxier
.
masqueradeAll
{
writeLine
(
proxier
.
natRules
,
append
(
args
,
"-j"
,
string
(
KubeMarkMasqChain
))
...
)
writeLine
(
proxier
.
natRules
,
append
(
args
,
"-j"
,
string
(
KubeMarkMasqChain
))
...
)
}
}
else
if
len
(
proxier
.
clusterCIDR
)
>
0
{
if
len
(
proxier
.
clusterCIDR
)
>
0
{
// This masquerades off-cluster traffic to a service VIP. The idea
// is that you can establish a static route for your Service range,
// routing to any node, and that node will bridge into the Service
// for you. Since that might bounce off-node, we masquerade here.
// If/when we support "Local" policy for VIPs, we should update this.
writeLine
(
proxier
.
natRules
,
append
(
args
,
"! -s"
,
proxier
.
clusterCIDR
,
"-j"
,
string
(
KubeMarkMasqChain
))
...
)
writeLine
(
proxier
.
natRules
,
append
(
args
,
"! -s"
,
proxier
.
clusterCIDR
,
"-j"
,
string
(
KubeMarkMasqChain
))
...
)
}
}
writeLine
(
proxier
.
natRules
,
append
(
args
,
"-j"
,
string
(
svcChain
))
...
)
writeLine
(
proxier
.
natRules
,
append
(
args
,
"-j"
,
string
(
svcChain
))
...
)
...
@@ -1480,7 +1484,7 @@ func (proxier *Proxier) syncProxyRules() {
...
@@ -1480,7 +1484,7 @@ func (proxier *Proxier) syncProxyRules() {
localEndpointChains
=
append
(
localEndpointChains
,
endpointChains
[
i
])
localEndpointChains
=
append
(
localEndpointChains
,
endpointChains
[
i
])
}
}
}
}
// First rule in the chain redirects all pod -> external
vip
traffic to the
// First rule in the chain redirects all pod -> external
VIP
traffic to the
// Service's ClusterIP instead. This happens whether or not we have local
// Service's ClusterIP instead. This happens whether or not we have local
// endpoints; only if clusterCIDR is specified
// endpoints; only if clusterCIDR is specified
if
len
(
proxier
.
clusterCIDR
)
>
0
{
if
len
(
proxier
.
clusterCIDR
)
>
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