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
8b16d66b
Commit
8b16d66b
authored
May 02, 2018
by
m1093782566
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add some comment message
parent
ac1cd3dc
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
2 deletions
+6
-2
proxier.go
pkg/proxy/iptables/proxier.go
+3
-1
proxier.go
pkg/proxy/ipvs/proxier.go
+3
-1
No files found.
pkg/proxy/iptables/proxier.go
View file @
8b16d66b
...
@@ -962,7 +962,7 @@ func (proxier *Proxier) syncProxyRules() {
...
@@ -962,7 +962,7 @@ func (proxier *Proxier) syncProxyRules() {
// (because the socket might open but it would never work).
// (because the socket might open but it would never work).
addresses
,
err
:=
utilproxy
.
GetNodeAddresses
(
proxier
.
nodePortAddresses
,
proxier
.
networkInterfacer
)
addresses
,
err
:=
utilproxy
.
GetNodeAddresses
(
proxier
.
nodePortAddresses
,
proxier
.
networkInterfacer
)
if
err
!=
nil
{
if
err
!=
nil
{
glog
.
Errorf
(
"Failed to get node ip address matching nodeport cidr
"
)
glog
.
Errorf
(
"Failed to get node ip address matching nodeport cidr
: %v"
,
err
)
continue
continue
}
}
...
@@ -976,6 +976,7 @@ func (proxier *Proxier) syncProxyRules() {
...
@@ -976,6 +976,7 @@ func (proxier *Proxier) syncProxyRules() {
Protocol
:
protocol
,
Protocol
:
protocol
,
}
}
lps
=
append
(
lps
,
lp
)
lps
=
append
(
lps
,
lp
)
// If we encounter a zero CIDR, then there is no point in processing the rest of the addresses.
break
break
}
}
lp
:=
utilproxy
.
LocalPort
{
lp
:=
utilproxy
.
LocalPort
{
...
@@ -987,6 +988,7 @@ func (proxier *Proxier) syncProxyRules() {
...
@@ -987,6 +988,7 @@ func (proxier *Proxier) syncProxyRules() {
lps
=
append
(
lps
,
lp
)
lps
=
append
(
lps
,
lp
)
}
}
// For ports on node IPs, open the actual port and hold it.
for
_
,
lp
:=
range
lps
{
for
_
,
lp
:=
range
lps
{
if
proxier
.
portsMap
[
lp
]
!=
nil
{
if
proxier
.
portsMap
[
lp
]
!=
nil
{
glog
.
V
(
4
)
.
Infof
(
"Port %s was open before and is still needed"
,
lp
.
String
())
glog
.
V
(
4
)
.
Infof
(
"Port %s was open before and is still needed"
,
lp
.
String
())
...
...
pkg/proxy/ipvs/proxier.go
View file @
8b16d66b
...
@@ -987,7 +987,7 @@ func (proxier *Proxier) syncProxyRules() {
...
@@ -987,7 +987,7 @@ func (proxier *Proxier) syncProxyRules() {
if
svcInfo
.
NodePort
!=
0
{
if
svcInfo
.
NodePort
!=
0
{
addresses
,
err
:=
utilproxy
.
GetNodeAddresses
(
proxier
.
nodePortAddresses
,
proxier
.
networkInterfacer
)
addresses
,
err
:=
utilproxy
.
GetNodeAddresses
(
proxier
.
nodePortAddresses
,
proxier
.
networkInterfacer
)
if
err
!=
nil
{
if
err
!=
nil
{
glog
.
Errorf
(
"Failed to get node ip address matching nodeport cidr
"
)
glog
.
Errorf
(
"Failed to get node ip address matching nodeport cidr
: %v"
,
err
)
continue
continue
}
}
...
@@ -1001,6 +1001,7 @@ func (proxier *Proxier) syncProxyRules() {
...
@@ -1001,6 +1001,7 @@ func (proxier *Proxier) syncProxyRules() {
Protocol
:
protocol
,
Protocol
:
protocol
,
}
}
lps
=
append
(
lps
,
lp
)
lps
=
append
(
lps
,
lp
)
// If we encounter a zero CIDR, then there is no point in processing the rest of the addresses.
break
break
}
}
lp
:=
utilproxy
.
LocalPort
{
lp
:=
utilproxy
.
LocalPort
{
...
@@ -1012,6 +1013,7 @@ func (proxier *Proxier) syncProxyRules() {
...
@@ -1012,6 +1013,7 @@ func (proxier *Proxier) syncProxyRules() {
lps
=
append
(
lps
,
lp
)
lps
=
append
(
lps
,
lp
)
}
}
// For ports on node IPs, open the actual port and hold it.
for
_
,
lp
:=
range
lps
{
for
_
,
lp
:=
range
lps
{
if
proxier
.
portsMap
[
lp
]
!=
nil
{
if
proxier
.
portsMap
[
lp
]
!=
nil
{
glog
.
V
(
4
)
.
Infof
(
"Port %s was open before and is still needed"
,
lp
.
String
())
glog
.
V
(
4
)
.
Infof
(
"Port %s was open before and is still needed"
,
lp
.
String
())
...
...
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