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
029a16a1
Commit
029a16a1
authored
May 14, 2018
by
m1093782566
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix review comments
parent
8b16d66b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
22 deletions
+14
-22
proxier.go
pkg/proxy/iptables/proxier.go
+7
-11
proxier.go
pkg/proxy/ipvs/proxier.go
+7
-11
No files found.
pkg/proxy/iptables/proxier.go
View file @
029a16a1
...
@@ -968,23 +968,19 @@ func (proxier *Proxier) syncProxyRules() {
...
@@ -968,23 +968,19 @@ func (proxier *Proxier) syncProxyRules() {
lps
:=
make
([]
utilproxy
.
LocalPort
,
0
)
lps
:=
make
([]
utilproxy
.
LocalPort
,
0
)
for
address
:=
range
addresses
{
for
address
:=
range
addresses
{
if
utilproxy
.
IsZeroCIDR
(
address
)
{
lp
:=
utilproxy
.
LocalPort
{
Description
:
"nodePort for "
+
svcNameString
,
IP
:
""
,
Port
:
svcInfo
.
NodePort
,
Protocol
:
protocol
,
}
lps
=
append
(
lps
,
lp
)
// If we encounter a zero CIDR, then there is no point in processing the rest of the addresses.
break
}
lp
:=
utilproxy
.
LocalPort
{
lp
:=
utilproxy
.
LocalPort
{
Description
:
"nodePort for "
+
svcNameString
,
Description
:
"nodePort for "
+
svcNameString
,
IP
:
address
,
IP
:
address
,
Port
:
svcInfo
.
NodePort
,
Port
:
svcInfo
.
NodePort
,
Protocol
:
protocol
,
Protocol
:
protocol
,
}
}
if
utilproxy
.
IsZeroCIDR
(
address
)
{
// Empty IP address means all
lp
.
IP
=
""
lps
=
append
(
lps
,
lp
)
// If we encounter a zero CIDR, then there is no point in processing the rest of the addresses.
break
}
lps
=
append
(
lps
,
lp
)
lps
=
append
(
lps
,
lp
)
}
}
...
...
pkg/proxy/ipvs/proxier.go
View file @
029a16a1
...
@@ -993,23 +993,19 @@ func (proxier *Proxier) syncProxyRules() {
...
@@ -993,23 +993,19 @@ func (proxier *Proxier) syncProxyRules() {
lps
:=
make
([]
utilproxy
.
LocalPort
,
0
)
lps
:=
make
([]
utilproxy
.
LocalPort
,
0
)
for
address
:=
range
addresses
{
for
address
:=
range
addresses
{
if
utilproxy
.
IsZeroCIDR
(
address
)
{
lp
:=
utilproxy
.
LocalPort
{
Description
:
"nodePort for "
+
svcNameString
,
IP
:
""
,
Port
:
svcInfo
.
NodePort
,
Protocol
:
protocol
,
}
lps
=
append
(
lps
,
lp
)
// If we encounter a zero CIDR, then there is no point in processing the rest of the addresses.
break
}
lp
:=
utilproxy
.
LocalPort
{
lp
:=
utilproxy
.
LocalPort
{
Description
:
"nodePort for "
+
svcNameString
,
Description
:
"nodePort for "
+
svcNameString
,
IP
:
address
,
IP
:
address
,
Port
:
svcInfo
.
NodePort
,
Port
:
svcInfo
.
NodePort
,
Protocol
:
protocol
,
Protocol
:
protocol
,
}
}
if
utilproxy
.
IsZeroCIDR
(
address
)
{
// Empty IP address means all
lp
.
IP
=
""
lps
=
append
(
lps
,
lp
)
// If we encounter a zero CIDR, then there is no point in processing the rest of the addresses.
break
}
lps
=
append
(
lps
,
lp
)
lps
=
append
(
lps
,
lp
)
}
}
...
...
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