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
cb0f4bd4
Commit
cb0f4bd4
authored
Sep 30, 2022
by
Brad Davidson
Committed by
Brad Davidson
Oct 07, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use structured logging instead of logrus for event recorders
Signed-off-by:
Brad Davidson
<
brad.davidson@rancher.com
>
parent
44ae7aa4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
api.go
pkg/util/api.go
+1
-1
No files found.
pkg/util/api.go
View file @
cb0f4bd4
...
...
@@ -104,7 +104,7 @@ func WaitForAPIServerReady(ctx context.Context, kubeconfigPath string, timeout t
func
BuildControllerEventRecorder
(
k8s
clientset
.
Interface
,
controllerName
,
namespace
string
)
record
.
EventRecorder
{
logrus
.
Infof
(
"Creating %s event broadcaster"
,
controllerName
)
eventBroadcaster
:=
record
.
NewBroadcaster
()
eventBroadcaster
.
Start
Logging
(
logrus
.
Infof
)
eventBroadcaster
.
Start
StructuredLogging
(
0
)
eventBroadcaster
.
StartRecordingToSink
(
&
coregetter
.
EventSinkImpl
{
Interface
:
k8s
.
CoreV1
()
.
Events
(
namespace
)})
nodeName
:=
os
.
Getenv
(
"NODE_NAME"
)
return
eventBroadcaster
.
NewRecorder
(
schemes
.
All
,
v1
.
EventSource
{
Component
:
controllerName
,
Host
:
nodeName
})
...
...
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