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
7da310ea
Unverified
Commit
7da310ea
authored
May 17, 2017
by
Clayton Coleman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix namespace controller logging to be consistent
time.Now() was wrong, simplify namespace controller output
parent
4f35b31f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
namespace_controller.go
pkg/controller/namespace/namespace_controller.go
+5
-5
No files found.
pkg/controller/namespace/namespace_controller.go
View file @
7da310ea
...
...
@@ -155,7 +155,9 @@ func (nm *NamespaceController) worker() {
// syncNamespaceFromKey looks for a namespace with the specified key in its store and synchronizes it
func
(
nm
*
NamespaceController
)
syncNamespaceFromKey
(
key
string
)
(
err
error
)
{
startTime
:=
time
.
Now
()
defer
glog
.
V
(
4
)
.
Infof
(
"Finished syncing namespace %q (%v)"
,
key
,
time
.
Now
()
.
Sub
(
startTime
))
defer
func
()
{
glog
.
V
(
4
)
.
Infof
(
"Finished syncing namespace %q (%v)"
,
key
,
time
.
Now
()
.
Sub
(
startTime
))
}()
namespace
,
err
:=
nm
.
lister
.
Get
(
key
)
if
errors
.
IsNotFound
(
err
)
{
...
...
@@ -174,16 +176,14 @@ func (nm *NamespaceController) Run(workers int, stopCh <-chan struct{}) {
defer
utilruntime
.
HandleCrash
()
defer
nm
.
queue
.
ShutDown
()
glog
.
Info
(
"Starting namespace controller"
)
defer
glog
.
Infof
(
"Shutting down namespace controller"
)
if
!
controller
.
WaitForCacheSync
(
"namespace"
,
stopCh
,
nm
.
listerSynced
)
{
return
}
glog
.
V
(
5
)
.
Info
(
"Starting workers"
)
for
i
:=
0
;
i
<
workers
;
i
++
{
go
wait
.
Until
(
nm
.
worker
,
time
.
Second
,
stopCh
)
}
<-
stopCh
glog
.
V
(
1
)
.
Infof
(
"Shutting down"
)
}
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