Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
k8s-ingress
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
3
Merge Requests
3
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
uplex-varnish
k8s-ingress
Commits
66c69663
Commit
66c69663
authored
May 15, 2020
by
Geoff Simmons
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve logging -- *what* was successfully synced.
parent
3ca48ed6
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
4 deletions
+22
-4
controller.go
pkg/controller/controller.go
+13
-0
worker.go
pkg/controller/worker.go
+9
-4
No files found.
pkg/controller/controller.go
View file @
66c69663
...
...
@@ -80,6 +80,19 @@ const (
Delete
)
func
(
t
SyncType
)
String
()
string
{
switch
t
{
case
Add
:
return
"add"
case
Update
:
return
"update"
case
Delete
:
return
"delete"
default
:
return
"unknown sync type"
}
}
// SyncObj wraps the object for which event handlers are notified, and
// encodes the sync event. These are the objects passed into the
// queues for workers.
...
...
pkg/controller/worker.go
View file @
66c69663
...
...
@@ -238,10 +238,15 @@ func (worker *NamespaceWorker) next() {
defer
worker
.
queue
.
Done
(
obj
)
if
err
:=
worker
.
dispatch
(
obj
);
err
==
nil
{
if
ns
,
name
,
err
:=
getNameSpace
(
obj
);
err
==
nil
{
worker
.
syncSuccess
(
obj
,
"Successfully synced: %s/%s"
,
ns
,
name
)
}
else
{
syncObj
,
ok
:=
obj
.
(
*
SyncObj
)
if
ok
{
if
ns
,
name
,
err
:=
getNameSpace
(
syncObj
.
Obj
);
err
==
nil
{
worker
.
syncSuccess
(
obj
,
"Successfully synced: %s %s/%s"
,
syncObj
.
Type
,
ns
,
name
)
}
}
if
!
ok
||
err
!=
nil
{
worker
.
syncSuccess
(
obj
,
"Successfully synced"
)
}
worker
.
queue
.
Forget
(
obj
)
...
...
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