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
f18c1333
Commit
f18c1333
authored
Aug 29, 2018
by
tizhou86
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix golint error under pkg/proxy.
parent
11387279
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
netlink_linux.go
pkg/proxy/ipvs/netlink_linux.go
+1
-1
proxier.go
pkg/proxy/ipvs/proxier.go
+2
-2
No files found.
pkg/proxy/ipvs/netlink_linux.go
View file @
f18c1333
...
@@ -115,7 +115,7 @@ func (h *netlinkHandle) ListBindAddress(devName string) ([]string, error) {
...
@@ -115,7 +115,7 @@ func (h *netlinkHandle) ListBindAddress(devName string) ([]string, error) {
if
err
!=
nil
{
if
err
!=
nil
{
return
nil
,
fmt
.
Errorf
(
"error list bound address of interface: %s, err: %v"
,
devName
,
err
)
return
nil
,
fmt
.
Errorf
(
"error list bound address of interface: %s, err: %v"
,
devName
,
err
)
}
}
ips
:=
make
([]
string
,
0
)
var
ips
[]
string
for
_
,
addr
:=
range
addrs
{
for
_
,
addr
:=
range
addrs
{
ips
=
append
(
ips
,
addr
.
IP
.
String
())
ips
=
append
(
ips
,
addr
.
IP
.
String
())
}
}
...
...
pkg/proxy/ipvs/proxier.go
View file @
f18c1333
...
@@ -987,7 +987,7 @@ func (proxier *Proxier) syncProxyRules() {
...
@@ -987,7 +987,7 @@ func (proxier *Proxier) syncProxyRules() {
continue
continue
}
}
lps
:=
make
([]
utilproxy
.
LocalPort
,
0
)
var
lps
[]
utilproxy
.
LocalPort
for
address
:=
range
addresses
{
for
address
:=
range
addresses
{
lp
:=
utilproxy
.
LocalPort
{
lp
:=
utilproxy
.
LocalPort
{
Description
:
"nodePort for "
+
svcNameString
,
Description
:
"nodePort for "
+
svcNameString
,
...
@@ -1078,7 +1078,7 @@ func (proxier *Proxier) syncProxyRules() {
...
@@ -1078,7 +1078,7 @@ func (proxier *Proxier) syncProxyRules() {
}
}
// Build ipvs kernel routes for each node ip address
// Build ipvs kernel routes for each node ip address
nodeIPs
:=
make
([]
net
.
IP
,
0
)
var
nodeIPs
[]
net
.
IP
for
address
:=
range
addresses
{
for
address
:=
range
addresses
{
if
!
utilproxy
.
IsZeroCIDR
(
address
)
{
if
!
utilproxy
.
IsZeroCIDR
(
address
)
{
nodeIPs
=
append
(
nodeIPs
,
net
.
ParseIP
(
address
))
nodeIPs
=
append
(
nodeIPs
,
net
.
ParseIP
(
address
))
...
...
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