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
76aab29e
Commit
76aab29e
authored
Jul 26, 2016
by
Matt T. Proud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pkg/controller/node/nodecontroller: simplify mutex
Similar to #29598, we can rely on the zero-value construction behavior to embed `sync.Mutex` into parent structs.
parent
ed3a29bd
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
3 deletions
+1
-3
nodecontroller.go
pkg/controller/node/nodecontroller.go
+1
-3
No files found.
pkg/controller/node/nodecontroller.go
View file @
76aab29e
...
@@ -114,7 +114,7 @@ type NodeController struct {
...
@@ -114,7 +114,7 @@ type NodeController struct {
nodeStatusMap
map
[
string
]
nodeStatusData
nodeStatusMap
map
[
string
]
nodeStatusData
now
func
()
unversioned
.
Time
now
func
()
unversioned
.
Time
// Lock to access evictor workers
// Lock to access evictor workers
evictorLock
*
sync
.
Mutex
evictorLock
sync
.
Mutex
// workers that evicts pods from unresponsive nodes.
// workers that evicts pods from unresponsive nodes.
zonePodEvictor
map
[
string
]
*
RateLimitedTimedQueue
zonePodEvictor
map
[
string
]
*
RateLimitedTimedQueue
zoneTerminationEvictor
map
[
string
]
*
RateLimitedTimedQueue
zoneTerminationEvictor
map
[
string
]
*
RateLimitedTimedQueue
...
@@ -181,7 +181,6 @@ func NewNodeController(
...
@@ -181,7 +181,6 @@ func NewNodeController(
glog
.
Fatal
(
"NodeController: Invalid clusterCIDR, mask size of clusterCIDR must be less than nodeCIDRMaskSize."
)
glog
.
Fatal
(
"NodeController: Invalid clusterCIDR, mask size of clusterCIDR must be less than nodeCIDRMaskSize."
)
}
}
}
}
evictorLock
:=
sync
.
Mutex
{}
nc
:=
&
NodeController
{
nc
:=
&
NodeController
{
cloud
:
cloud
,
cloud
:
cloud
,
...
@@ -190,7 +189,6 @@ func NewNodeController(
...
@@ -190,7 +189,6 @@ func NewNodeController(
recorder
:
recorder
,
recorder
:
recorder
,
podEvictionTimeout
:
podEvictionTimeout
,
podEvictionTimeout
:
podEvictionTimeout
,
maximumGracePeriod
:
5
*
time
.
Minute
,
maximumGracePeriod
:
5
*
time
.
Minute
,
evictorLock
:
&
evictorLock
,
zonePodEvictor
:
make
(
map
[
string
]
*
RateLimitedTimedQueue
),
zonePodEvictor
:
make
(
map
[
string
]
*
RateLimitedTimedQueue
),
zoneTerminationEvictor
:
make
(
map
[
string
]
*
RateLimitedTimedQueue
),
zoneTerminationEvictor
:
make
(
map
[
string
]
*
RateLimitedTimedQueue
),
nodeStatusMap
:
make
(
map
[
string
]
nodeStatusData
),
nodeStatusMap
:
make
(
map
[
string
]
nodeStatusData
),
...
...
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